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