# 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@ [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