2023-03-16 18:50:32 -04:00
|
|
|
#!/command/with-contenv bash
|
|
|
|
# shellcheck shell=bash
|
2020-02-18 23:55:06 -05:00
|
|
|
|
2023-03-16 18:50:32 -04:00
|
|
|
set -e
|
2020-02-18 23:55:06 -05:00
|
|
|
|
2024-01-09 18:32:12 -05:00
|
|
|
. /usr/bin/common.sh
|
2023-03-20 02:56:52 -04:00
|
|
|
|
2023-03-29 19:04:37 -04:00
|
|
|
cd /app || exit 1
|
2023-03-20 02:56:52 -04:00
|
|
|
|
2023-03-29 21:19:16 -04:00
|
|
|
log_info 'Starting backend ...'
|
|
|
|
|
|
|
|
if [ "${DEVELOPMENT:-}" = 'true' ]; then
|
2023-05-03 20:03:06 -04:00
|
|
|
s6-setuidgid "$PUID:$PGID" yarn install
|
|
|
|
exec s6-setuidgid "$PUID:$PGID" bash -c "export HOME=$NPMHOME;node --max_old_space_size=250 --abort_on_uncaught_exception node_modules/nodemon/bin/nodemon.js"
|
2020-02-18 23:55:06 -05:00
|
|
|
else
|
|
|
|
while :
|
|
|
|
do
|
2023-05-03 20:03:06 -04:00
|
|
|
s6-setuidgid "$PUID:$PGID" bash -c "export HOME=$NPMHOME;node --abort_on_uncaught_exception --max_old_space_size=250 index.js"
|
2020-02-18 23:55:06 -05:00
|
|
|
sleep 1
|
|
|
|
done
|
|
|
|
fi
|