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