2023-03-16 22:50:32 +00:00
|
|
|
#!/command/with-contenv bash
|
|
|
|
# shellcheck shell=bash
|
|
|
|
|
|
|
|
set -e
|
2020-02-19 04:55:06 +00:00
|
|
|
|
|
|
|
# This service is DEVELOPMENT only.
|
|
|
|
|
|
|
|
if [ "$DEVELOPMENT" == "true" ]; then
|
2023-03-20 06:56:52 +00:00
|
|
|
. /bin/common.sh
|
2020-02-19 04:55:06 +00:00
|
|
|
cd /app/frontend || exit 1
|
2023-03-20 06:56:52 +00: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 23:09:01 +00:00
|
|
|
# If yarn install fails: add --verbose --network-concurrency 1
|
2023-03-20 06:56:52 +00:00
|
|
|
s6-setuidgid npmuser yarn install
|
|
|
|
exec s6-setuidgid npmuser yarn watch
|
2020-02-19 04:55:06 +00:00
|
|
|
else
|
|
|
|
exit 0
|
|
|
|
fi
|