blob: 3411476d0ca179e1d953b8d6b61c3eabede35a8f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#!/bin/sh
# dispatch-frontend service — serves the built frontend assets as the `tradam` user.
# stdout/stderr are piped to dispatch-frontend-log via the s6-rc pipeline.
DISPATCH_CONF="/etc/dispatch/dispatch-frontend.conf"
DISPATCH_DIR="/opt/dispatch"
if [ -f "$DISPATCH_CONF" ]; then
set -a
. "$DISPATCH_CONF"
set +a
fi
cd "$DISPATCH_DIR" || exit 1
exec 2>&1
exec /usr/bin/s6-setuidgid tradam \
/usr/bin/env \
HOME=/home/tradam \
USER=tradam \
LOGNAME=tradam \
PATH=/usr/local/bin:/usr/bin:/bin \
PORT="${PORT:-18391}" \
/usr/bin/bun packages/frontend/serve.ts
|