2023-03-16 18:50:32 -04:00
|
|
|
#!/command/with-contenv bash
|
|
|
|
# shellcheck shell=bash
|
|
|
|
|
|
|
|
set -e
|
2020-02-18 23:55:06 -05:00
|
|
|
|
|
|
|
# This service is DEVELOPMENT only.
|
|
|
|
|
2023-03-29 21:19:16 -04:00
|
|
|
if [ "$DEVELOPMENT" = 'true' ]; then
|
2023-03-20 02:56:52 -04:00
|
|
|
. /bin/common.sh
|
2020-02-18 23:55:06 -05:00
|
|
|
cd /app/frontend || exit 1
|
2023-05-03 20:03:06 -04:00
|
|
|
HOME=$NPMHOME
|
2023-03-20 02:56:52 -04:00
|
|
|
export HOME
|
|
|
|
mkdir -p /app/frontend/dist
|
2023-03-29 19:04:37 -04:00
|
|
|
chown -R "$PUID:$PGID" /app/frontend/dist
|
|
|
|
|
2023-03-29 21:19:16 -04:00
|
|
|
log_info 'Starting frontend ...'
|
2023-05-03 20:03:06 -04:00
|
|
|
s6-setuidgid "$PUID:$PGID" yarn install
|
|
|
|
exec s6-setuidgid "$PUID:$PGID" yarn watch
|
2020-02-18 23:55:06 -05:00
|
|
|
else
|
|
|
|
exit 0
|
|
|
|
fi
|