29 lines
636 B
Desktop File
29 lines
636 B
Desktop File
[Unit]
|
|
Description=Mikrotik Adlist - Flask application for hosts file conversion
|
|
After=network-online.target redis.service
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
|
User=www-data
|
|
Group=www-data
|
|
|
|
# główny katalog aplikacji
|
|
Environment="APP_DIR=/var/www/adlist_mikrotik"
|
|
WorkingDirectory=/var/www/adlist_mikrotik
|
|
EnvironmentFile=-/var/www/adlist_mikrotik/.env
|
|
Environment="PATH=${APP_DIR}/venv/bin"
|
|
|
|
ExecStart=${APP_DIR}/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
|