refactor
This commit is contained in:
parent
d1d0ccc311
commit
7697fed0cb
@ -1,19 +1,12 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Hosts Application
|
Description=.etc.hosts Manager Waitress Service
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
#User=www-data # Zmień na odpowiedniego użytkownika
|
|
||||||
#Group=www-data
|
|
||||||
WorkingDirectory=/opt/hosts_app
|
WorkingDirectory=/opt/hosts_app
|
||||||
Environment="PATH=/opt/hosts_app/venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
ExecStart=/opt/hosts_app/venv/bin/python3 /opt/hosts_app/run_waitress.py
|
||||||
Environment="FLASK_APP=app.py"
|
|
||||||
Environment="FLASK_ENV=production"
|
|
||||||
|
|
||||||
ExecStart=/opt/hosts_app/venv/bin/gunicorn -c /opt/hosts_app/gunicorn_config.py app:app
|
|
||||||
|
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=5
|
Environment=PYTHONUNBUFFERED=1
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
7
requirements.txt
Normal file
7
requirements.txt
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
Flask
|
||||||
|
Werkzeug
|
||||||
|
Flask-SQLAlchemy
|
||||||
|
paramiko
|
||||||
|
apscheduler
|
||||||
|
gunicorn
|
||||||
|
waitress
|
Loading…
x
Reference in New Issue
Block a user