[Unit] Description=TimeMaster FastAPI Backend After=network.target postgresql.service redis.service Requires=postgresql.service redis.service [Service] Type=exec User=www-data Group=www-data WorkingDirectory=/opt/timemaster/backend EnvironmentFile=/opt/timemaster/backend/.env ExecStart=/opt/timemaster/backend/venv/bin/uvicorn app.main:app \ --host 127.0.0.1 \ --port 8000 \ --workers 4 \ --log-level info \ --access-log ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure RestartSec=5 StandardOutput=journal StandardError=journal SyslogIdentifier=timemaster # Sicherheit NoNewPrivileges=yes PrivateTmp=yes ProtectSystem=strict ReadWritePaths=/opt/timemaster/backend [Install] WantedBy=multi-user.target