diff options
Diffstat (limited to 'packaging/[email protected]')
| -rw-r--r-- | packaging/[email protected] | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/packaging/[email protected] b/packaging/[email protected] new file mode 100644 index 0000000..6f35cc1 --- /dev/null +++ b/packaging/[email protected] @@ -0,0 +1,22 @@ +# Dispatch Frontend — system service template. +# Runs under the system manager (PID 1) but drops privileges to the user named +# in the instance: `dispatch-frontend@tradam` runs as the `tradam` user. +# Tied to the matching API instance for the same user. +# +# Enable/start: +# sudo systemctl enable --now dispatch-frontend@<user> +[Unit] +Description=Dispatch Frontend (static file server, running as %i) +After=dispatch-api@%i.service + +[Service] +Type=simple +User=%i +WorkingDirectory=/opt/dispatch +ExecStart=/usr/bin/bun packages/frontend/serve.ts +EnvironmentFile=-/etc/dispatch/dispatch-frontend.conf +Restart=on-failure +RestartSec=5 + +[Install] +WantedBy=multi-user.target |
