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.
|
|
|
|
|
|
|
|
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-03-20 02:56:52 -04:00
|
|
|
log_info 'Starting frontend ...'
|
|
|
|
HOME=/tmp/npmuserhome
|
|
|
|
export HOME
|
|
|
|
mkdir -p /app/frontend/dist
|
|
|
|
chown -R npmuser:npmuser /app/frontend/dist
|
2021-04-23 19:09:01 -04:00
|
|
|
# If yarn install fails: add --verbose --network-concurrency 1
|
2023-03-20 02:56:52 -04:00
|
|
|
s6-setuidgid npmuser yarn install
|
|
|
|
exec s6-setuidgid npmuser yarn watch
|
2020-02-18 23:55:06 -05:00
|
|
|
else
|
|
|
|
exit 0
|
|
|
|
fi
|