[Unit] Description=Workshop C2 FastAPI service After=network.target [Service] Type=simple WorkingDirectory=/home/kemp/ins/teaching/workshop-c-and-c-server # Run the requested command. This uses /usr/bin/env to locate `uv` in PATH. ExecStart=/usr/bin/env uv run main.py # Ensure common system paths are available when using /usr/bin/env Environment=PATH=/usr/local/bin:/usr/bin:/bin Environment=PYTHONUNBUFFERED=1 # Automatically restart the process if it exits/crashes Restart=always RestartSec=5 # Log to the journal/syslog with a clear identifier StandardOutput=journal StandardError=journal SyslogIdentifier=workshop-c2 # (Optional) Uncomment and set a non-root user if desired #User=www-data #Group=www-data [Install] WantedBy=multi-user.target