Trying to make this work on my server. Testing...
This commit is contained in:
26
\
Normal file
26
\
Normal file
@@ -0,0 +1,26 @@
|
||||
[Unit]
|
||||
Description=gunicorn daemon
|
||||
Requires=gunicorn.socket
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
# the specific user that our service will run as
|
||||
User=root
|
||||
Group=root
|
||||
# another option for an even more restricted service is
|
||||
# DynamicUser=yes
|
||||
# see http://0pointer.net/blog/dynamic-users-with-systemd.html
|
||||
RuntimeDirectory=gunicorn
|
||||
WorkingDirectory=/home/scott/OSIT_dev/aether_api_fastapi
|
||||
Environment="PATH=/home/scott/OSIT_dev/aether_api_fastapi/environment/bin"
|
||||
#ExecStart=/home/scott/test/python_fastapi/environment/bin/gunicorn --workers 3 app.main:app
|
||||
#ExecStart=/home/scott/test/python_fastapi/environment/bin/gunicorn --workers 1 -k uvicorn.workers.UvicornWorker --ws websockets --bind unix:/home/scott/test/python_fastapi/gunicorn.sock -m 007 app.main:app --reload
|
||||
ExecStart=/home/scott/OSIT_dev/aether_api_fastapi/environment/bin/gunicorn --bind unix:/home/scott/OSIT_dev/aether_api_fastapi/gunicorn.sock --unmask 007 app.main:app --workers 2 --worker-class uvicorn.workers.UvicornWorker --access-logfile admin/log/access.log --error-logfile admin/log/error.log, --log-file admin/log/log.log --capture-output --keep-alive 5 --reload
|
||||
ExecReload=/bin/kill -s HUP $MAINPID
|
||||
KillMode=mixed
|
||||
TimeoutStopSec=5
|
||||
PrivateTmp=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
BIN
admin/documentation/.run locally.txt.kate-swp
Normal file
BIN
admin/documentation/.run locally.txt.kate-swp
Normal file
Binary file not shown.
@@ -23,12 +23,20 @@ sudo systemctl daemon-reload
|
||||
sudo systemctl enable gunicorn.socket
|
||||
sudo systemctl start gunicorn.socket
|
||||
sudo systemctl status gunicorn.socket
|
||||
sudo systemctl status gunicorn.service
|
||||
|
||||
???sudo systemctl enable gunicorn.service???
|
||||
???sudo systemctl start gunicorn.service???
|
||||
# Do not: sudo systemctl enable gunicorn.service
|
||||
# Do not? sudo systemctl start gunicorn.service
|
||||
|
||||
sudo vim /etc/nginx/sites-available/dev_fastapi.oneskyit.com
|
||||
sudo ln -s /etc/nginx/sites-available/dev_fastapi.oneskyit.com /etc/nginx/sites-enabled/dev_fastapi.oneskyit.com
|
||||
|
||||
sudo systemctl restart nginx.service
|
||||
sudo systemctl status nginx.service
|
||||
|
||||
# Troubleshooting:
|
||||
systemctl list-units --type=service --state=active
|
||||
systemctl list-units --type=service --state=running
|
||||
|
||||
sudo systemctl | grep running
|
||||
sudo systemctl list-unit-files | grep enabled
|
||||
|
||||
@@ -8,3 +8,4 @@ aioredis
|
||||
html2text
|
||||
pytz
|
||||
#mypy
|
||||
stripe
|
||||
|
||||
Reference in New Issue
Block a user