# systemd-Service für den Projekt-Hub (Gunicorn). # # Installation: # sudo cp deploy/projekt-hub.service /etc/systemd/system/projekt-hub.service # # Pfade/Nutzer unten ggf. anpassen, dann: # sudo systemctl daemon-reload # sudo systemctl enable --now projekt-hub # sudo systemctl status projekt-hub # # Annahme: Code unter /home/projekthub/projekt-hub, venv unter .venv. [Unit] Description=Projekt-Hub Flask App (Gunicorn) After=network.target # Falls Rate-Limiting über lokales Redis läuft, Redis vorher starten: # After=network.target redis-server.service # Wants=redis-server.service [Service] User=projekthub Group=www-data WorkingDirectory=/home/projekthub/projekt-hub Environment="PATH=/home/projekthub/projekt-hub/.venv/bin" ExecStart=/home/projekthub/projekt-hub/.venv/bin/gunicorn -c gunicorn.conf.py wsgi:app Restart=always RestartSec=3 # Etwas Härtung (optional, aber empfohlen): NoNewPrivileges=true PrivateTmp=true ProtectSystem=full [Install] WantedBy=multi-user.target