add logs to debug

This commit is contained in:
Thomas 2023-11-09 20:29:38 +01:00 committed by GitHub
parent a1c38e5fdb
commit e9d8438117
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 1 deletions

View file

@ -9,7 +9,9 @@ User=__APP__
Group=__APP__
WorkingDirectory=__INSTALL_DIR__/
EnvironmentFile=__INSTALL_DIR__/.env
ExecStart=__INSTALL_DIR__/venv/bin/gunicorn bookwyrm.wsgi:application --bind 127.0.0.1:__PORT__
ExecStart=__INSTALL_DIR__/venv/bin/gunicorn bookwyrm.wsgi:application --bind 127.0.0.1:__PORT__ --error-logfile /var/log/__APP__/__APP__.log
StandardOutput=append:/var/log/__APP__/__APP__.log
StandardError=inherit
[Install]
WantedBy=multi-user.target

View file

@ -58,6 +58,16 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=1
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
# LOGROTATE CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring logrotate..." --weight=1
# Use logrotate to manage application logfile(s)
ynh_use_logrotate --specific_user=$app
touch /var/log/$app/$app.log
chown -R $app:www-data /var/log/$app/
#=================================================
# SETUP SYSTEMD
#=================================================