entrypoint.sh 360 B

123456789101112131415
  1. #!/bin/bash
  2. if [[ "${CONTAINER_MODE}" == "dev" ]]; then
  3. npm install --silent
  4. fi
  5. if [[ "${FRONTEND_MODE}" == "prod" ]]; then
  6. if [[ "${CONTAINER_MODE}" == "dev" ]]; then
  7. npm run prod
  8. fi
  9. nginx -c /opt/app/prod.nginx.conf -g "daemon off;"
  10. elif [ "${FRONTEND_MODE}" == "dev" ]; then
  11. nginx -c /opt/app/dev.nginx.conf
  12. npm run dev
  13. fi