20 lines
706 B
Desktop File
20 lines
706 B
Desktop File
# systemd --user unit for the Thermograph LAN dev server.
|
|
# Installed by deploy/deploy-dev.sh into ~/.config/systemd/user/ with the
|
|
# @PLACEHOLDER@ tokens substituted for this machine's paths/port.
|
|
# Runs sudo-free as your own user; linger keeps it up across logout/reboot.
|
|
[Unit]
|
|
Description=Thermograph (dev, LAN) - FastAPI/uvicorn
|
|
After=network-online.target
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
|
Type=exec
|
|
WorkingDirectory=@APP_DIR@/backend
|
|
Environment=THERMOGRAPH_BASE=@BASE@
|
|
# Bind all interfaces so other devices on the LAN (e.g. your phone) can reach it.
|
|
ExecStart=@APP_DIR@/.venv/bin/uvicorn app:app --host 0.0.0.0 --port @PORT@
|
|
Restart=on-failure
|
|
RestartSec=2
|
|
|
|
[Install]
|
|
WantedBy=default.target
|