nginx-proxy-manager-zh/docker/rootfs/etc/s6-overlay/s6-rc.d/backend/run

19 lines
389 B
Plaintext
Raw Normal View History

2023-02-24 03:31:46 -05:00
#!/command/with-contenv bash
set -e
2023-02-24 03:31:46 -05:00
echo " Starting backend ..."
if [ "$DEVELOPMENT" == "true" ]; then
HOME=/tmp/npmuserhome
GOPATH="$HOME/go"
mkdir -p "$GOPATH"
chown -R npmuser:npmuser "$GOPATH"
export HOME GOPATH
rm -rf /app/backend/.task
cd /app/backend || exit 1
2023-02-24 03:31:46 -05:00
exec s6-setuidgid npmuser task -w
else
cd /app/bin || exit 1
2023-02-24 03:31:46 -05:00
exec s6-setuidgid npmuser /app/bin/server
fi