clean code

This commit is contained in:
Mateusz Gruszczyński
2025-08-29 12:03:47 +02:00
parent bc45c91d92
commit 9546bb4edb
2 changed files with 137 additions and 38 deletions

View File

@@ -1,21 +1,19 @@
[Unit]
Description=ListApp - Flask application for hosts file conversion
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
WorkingDirectory=/var/www/listapp
# Globalne env + nadpisania (opcjonalne; minus oznacza „jeśli istnieje”)
EnvironmentFile=-/var/www/listapp/.env
# 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"
# Ścieżka do virtualenv
Environment="PATH=/var/www/listapp/venv/bin"
# Gunicorn + UvicornWorker (ASGI)
ExecStart=/var/www/listapp/venv/bin/gunicorn \
ExecStart=${APP_DIR}/venv/bin/gunicorn \
-k uvicorn.workers.UvicornWorker \
--workers 4 \
--bind 127.0.0.1:8283 \