added gunicorn service socket and nginx config.

This commit is contained in:
Alexander Schulz
2024-08-30 23:40:20 +02:00
parent cf942a1a7b
commit cd3eb0e07c
3 changed files with 47 additions and 0 deletions

18
gunicorn.service Normal file
View File

@ -0,0 +1,18 @@
#cp to /etc/systemd/system/gunicorn.service
[Unit]
Description=gunicorn daemon
Requires=gunicorn.socket
After=network.target
[Service]
User=root
Group=www-data
WorkingDirectory=/root/appdirectory/
ExecStart=/root/appdirectory/testappenv/bin/gunicorn \
--access-logfile - \
--workers 3 \
--bind unix:/run/gunicorn.sock \
testapp.wsgi:application
[Install]
WantedBy=multi-user.target