Files
MermsFirstOffice/run.sh
T
CHIEFSOFT\ameye 04b7c5c4ff temporary fix
2025-11-17 07:05:25 -05:00

37 lines
886 B
Bash
Executable File

#!/usr/bin/env sh
set -e
set -x
export NODE_ENV="${NODE_ENV:-development}"
if [ $NODE_ENV = "development" ]; then
# this runs webpack-dev-server with hot reloading
echo "Development build"
npm install --legacy-peer-deps
npm run start -- --host
# npm run build
elif [ $NODE_ENV = "qa" -o $NODE_ENV = "test" ]; then
echo "QA build"
export NODE_ENV="test"
npm install --legacy-peer-deps
npm run start -- --host
else
# build the app and serve it via nginx
echo "Temporary to fix build Production build bug"
echo "QA build"
export NODE_ENV="test"
npm install --legacy-peer-deps
npm run start -- --host
# # build the app and serve it via nginx
# echo "Production build"
# npm install --legacy-peer-deps
# npm run build
# # Testing sometimes
# # npm run start
# nginx -g 'daemon off;' -c /usr/src/app/nginx.conf
# nginx -c /usr/src/app/nginx.conf
fi