entrypoint.sh 420 B

1234567891011121314151617181920
  1. #!/bin/bash
  2. if [[ "${CONTAINER_MODE}" == "development" ]]; then
  3. npm install --silent
  4. if [[ "${BACKEND_MODE}" == "production" ]]; then
  5. npm run build
  6. fi
  7. fi
  8. if [[ "${BACKEND_DEBUG}" == "true" ]]; then
  9. export INSPECT_BRK="--inspect-brk=0.0.0.0:${BACKEND_DEBUG_PORT:-9229}"
  10. else
  11. export INSPECT_BRK=""
  12. fi
  13. if [[ "${BACKEND_MODE}" == "production" ]]; then
  14. npm run prod
  15. else
  16. npm run dev
  17. fi