mirror of
https://github.com/YunoHost-Apps/bookwyrm_ynh.git
synced 2024-09-03 18:16:12 +02:00
fix logs
This commit is contained in:
parent
09229acf3b
commit
68c0fe7d1e
7 changed files with 20 additions and 13 deletions
|
@ -10,6 +10,8 @@ Group=__APP__
|
||||||
WorkingDirectory=__INSTALL_DIR__/
|
WorkingDirectory=__INSTALL_DIR__/
|
||||||
EnvironmentFile=__INSTALL_DIR__/.env
|
EnvironmentFile=__INSTALL_DIR__/.env
|
||||||
ExecStart=__INSTALL_DIR__/venv/bin/celery -A celerywyrm beat -l INFO --scheduler django_celery_beat.schedulers:DatabaseScheduler
|
ExecStart=__INSTALL_DIR__/venv/bin/celery -A celerywyrm beat -l INFO --scheduler django_celery_beat.schedulers:DatabaseScheduler
|
||||||
|
StandardOutput=append:/var/log/__APP__/__APP__-beat.log
|
||||||
|
StandardError=inherit
|
||||||
|
|
||||||
NoNewPrivileges=yes
|
NoNewPrivileges=yes
|
||||||
PrivateTmp=yes
|
PrivateTmp=yes
|
||||||
|
|
|
@ -9,7 +9,8 @@ User=__APP__
|
||||||
Group=__APP__
|
Group=__APP__
|
||||||
WorkingDirectory=__INSTALL_DIR__/
|
WorkingDirectory=__INSTALL_DIR__/
|
||||||
EnvironmentFile=__INSTALL_DIR__/.env
|
EnvironmentFile=__INSTALL_DIR__/.env
|
||||||
ExecStart=__INSTALL_DIR__/venv/bin/gunicorn bookwyrm.wsgi:application --bind 127.0.0.1:__PORT__ --error-logfile /var/log/__APP__/__APP__.log
|
ExecStart=__INSTALL_DIR__/venv/bin/gunicorn bookwyrm.wsgi:application --bind 127.0.0.1:__PORT__
|
||||||
|
StandardOutput=append:/var/log/__APP__/__APP__.log
|
||||||
StandardError=inherit
|
StandardError=inherit
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|
|
@ -10,6 +10,8 @@ Group=__APP__
|
||||||
WorkingDirectory=__INSTALL_DIR__/
|
WorkingDirectory=__INSTALL_DIR__/
|
||||||
EnvironmentFile=__INSTALL_DIR__/.env
|
EnvironmentFile=__INSTALL_DIR__/.env
|
||||||
ExecStart=__INSTALL_DIR__/venv/bin/celery -A celerywyrm worker -l info -Q high_priority,medium_priority,low_priority,imports
|
ExecStart=__INSTALL_DIR__/venv/bin/celery -A celerywyrm worker -l info -Q high_priority,medium_priority,low_priority,imports
|
||||||
|
StandardOutput=append:/var/log/__APP__/__APP__-worker.log
|
||||||
|
StandardError=inherit
|
||||||
|
|
||||||
NoNewPrivileges=yes
|
NoNewPrivileges=yes
|
||||||
PrivateTmp=yes
|
PrivateTmp=yes
|
||||||
|
|
|
@ -66,6 +66,8 @@ ynh_script_progression --message="Configuring logrotate..." --weight=1
|
||||||
# Use logrotate to manage application logfile(s)
|
# Use logrotate to manage application logfile(s)
|
||||||
ynh_use_logrotate --specific_user=$app
|
ynh_use_logrotate --specific_user=$app
|
||||||
touch /var/log/$app/$app.log
|
touch /var/log/$app/$app.log
|
||||||
|
touch /var/log/$app/$app-beat.log
|
||||||
|
touch /var/log/$app/$app-worker.log
|
||||||
chown -R $app:www-data /var/log/$app/
|
chown -R $app:www-data /var/log/$app/
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -87,9 +89,9 @@ ynh_add_systemd_config --service="bookwyrm-beat" --template="bookwyrm-beat.ser
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
||||||
|
|
||||||
yunohost service add "bookwyrm-beat"
|
yunohost service add "bookwyrm-beat" --log="/var/log/$app/$app-beat.log"
|
||||||
yunohost service add "bookwyrm-server"
|
yunohost service add "bookwyrm-server" --log="/var/log/$app/$app.log"
|
||||||
yunohost service add "bookwyrm-worker"
|
yunohost service add "bookwyrm-worker" --log="/var/log/$app/$app-worker.log"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
|
|
|
@ -33,9 +33,9 @@ ynh_systemd_action --service_name="bookwyrm-server" --action="stop" --log_path="
|
||||||
ynh_systemd_action --service_name="bookwyrm-worker" --action="stop" --log_path="systemd" --line_match="Stopped $app"
|
ynh_systemd_action --service_name="bookwyrm-worker" --action="stop" --log_path="systemd" --line_match="Stopped $app"
|
||||||
|
|
||||||
# Remove the dedicated systemd config
|
# Remove the dedicated systemd config
|
||||||
ynh_remove_systemd_config --service="bookwyrm-beat"
|
ynh_remove_systemd_config --service="bookwyrm-beat" --log="/var/log/$app/$app-beat.log"
|
||||||
ynh_remove_systemd_config --service="bookwyrm-server"
|
ynh_remove_systemd_config --service="bookwyrm-server" --log="/var/log/$app/$app.log"
|
||||||
ynh_remove_systemd_config --service="bookwyrm-worker"
|
ynh_remove_systemd_config --service="bookwyrm-worker" --log="/var/log/$app/$app-worker.log"
|
||||||
|
|
||||||
ynh_secure_remove --file="/etc/systemd/system/bookwyrm.target"
|
ynh_secure_remove --file="/etc/systemd/system/bookwyrm.target"
|
||||||
|
|
||||||
|
|
|
@ -58,9 +58,9 @@ systemctl enable "bookwyrm-worker.service" --quiet
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
||||||
|
|
||||||
yunohost service add "bookwyrm-beat"
|
yunohost service add "bookwyrm-beat" --log="/var/log/$app/$app-beat.log"
|
||||||
yunohost service add "bookwyrm-server"
|
yunohost service add "bookwyrm-server" --log="/var/log/$app/$app.log"
|
||||||
yunohost service add "bookwyrm-worker"
|
yunohost service add "bookwyrm-worker" --log="/var/log/$app/$app-worker.log"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
|
|
|
@ -103,9 +103,9 @@ ynh_add_systemd_config --service="bookwyrm-beat" --template="bookwyrm-beat.ser
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
||||||
|
|
||||||
yunohost service add "bookwyrm-beat"
|
yunohost service add "bookwyrm-beat" --log="/var/log/$app/$app-beat.log"
|
||||||
yunohost service add "bookwyrm-server"
|
yunohost service add "bookwyrm-server" --log="/var/log/$app/$app.log"
|
||||||
yunohost service add "bookwyrm-worker"
|
yunohost service add "bookwyrm-worker" --log="/var/log/$app/$app-worker.log"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
|
|
Loading…
Add table
Reference in a new issue