[Unit] Description=Thor web (health, metrics, UI, API, MCP) After=network-online.target Wants=network-online.target [Service] Type=simple User=thor Group=thor WorkingDirectory=/opt/thor/app # THOR_SHA, written by thor_deploy.sh: the commit /health reports. EnvironmentFile=-/opt/thor/revision.env ExecStart=/opt/thor/venv/bin/gunicorn --workers 2 --bind 127.0.0.1:8000 --access-logfile - thor.web.wsgi:app Restart=always RestartSec=5 NoNewPrivileges=true ProtectSystem=strict ProtectHome=true PrivateTmp=true PrivateDevices=true ProtectKernelTunables=true ProtectControlGroups=true RestrictSUIDSGID=true LockPersonality=true [Install] WantedBy=multi-user.target