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