summaryrefslogtreecommitdiffhomepage
path: root/packaging/[email protected]
blob: 6f35cc16584a8caba93f0851cb8b842a9c6688fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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