entrypoint.sh 388 B

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