hosts_app/hosts_app.service
2025-02-23 00:38:05 +01:00

20 lines
500 B
Desktop File

[Unit]
Description=Hosts Application
After=network.target
[Service]
#User=www-data # Zmień na odpowiedniego użytkownika
#Group=www-data
WorkingDirectory=/opt/hosts_app
Environment="PATH=/opt/hosts_app/venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
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
RestartSec=5
[Install]
WantedBy=multi-user.target