Files
adlist_mikrotik/listapp.service
Mateusz Gruszczyński 01b8ff656e refactor
2025-08-28 22:54:52 +02:00

31 lines
687 B
Desktop File

[Unit]
Description=ListApp - Flask application for hosts file conversion
After=network-online.target redis.service
Wants=network-online.target
[Service]
User=www-data
Group=www-data
WorkingDirectory=/var/www/listapp
# Globalne env + nadpisania (opcjonalne; minus oznacza „jeśli istnieje”)
EnvironmentFile=-/var/www/listapp/.env
# Ścieżka do virtualenv
Environment="PATH=/var/www/listapp/venv/bin"
# Gunicorn + UvicornWorker (ASGI)
ExecStart=/var/www/listapp/venv/bin/gunicorn \
-k uvicorn.workers.UvicornWorker \
--workers 4 \
--bind 127.0.0.1:8283 \
--keep-alive 30 \
--timeout 90 \
app:asgi_app
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target