2023-02-24 03:31:46 -05:00
|
|
|
#!/command/with-contenv bash
|
2023-03-09 07:11:28 -05:00
|
|
|
# shellcheck shell=bash
|
|
|
|
|
2023-02-24 03:31:46 -05:00
|
|
|
set -e
|
2020-02-18 23:55:06 -05:00
|
|
|
|
2023-05-10 19:58:20 -04:00
|
|
|
. /bin/common.sh
|
|
|
|
|
|
|
|
if [ "$(is_true "$DEBUG")" = '1' ]; then
|
|
|
|
set -x
|
|
|
|
fi
|
2020-02-18 23:55:06 -05:00
|
|
|
|
2023-05-10 19:58:20 -04:00
|
|
|
# This service is DEVELOPMENT only.
|
|
|
|
if [ "$(is_true "$DEVELOPMENT")" = '1' ]; then
|
2022-05-11 18:47:31 -04:00
|
|
|
CI=true
|
2023-05-10 19:58:20 -04:00
|
|
|
HOME=$NPMHOME
|
2022-05-11 18:47:31 -04:00
|
|
|
export CI
|
|
|
|
export HOME
|
2023-04-10 19:12:48 -04:00
|
|
|
|
2020-02-18 23:55:06 -05:00
|
|
|
cd /app/frontend || exit 1
|
2023-04-10 19:12:48 -04:00
|
|
|
|
|
|
|
log_info 'Starting frontend ...'
|
2023-05-10 19:58:20 -04:00
|
|
|
s6-setuidgid "$PUID:$PGID" yarn install
|
|
|
|
exec s6-setuidgid "$PUID:$PGID" yarn start
|
2020-02-18 23:55:06 -05:00
|
|
|
else
|
|
|
|
exit 0
|
|
|
|
fi
|