entrypoint.dev.sh 307 B

1234567891011121314151617
  1. #!/bin/sh
  2. set -e
  3. if [ ! -d node_modules ]; then
  4. npm install
  5. fi
  6. if [ "${APP_ENV}" = "development" ]; then
  7. ln -sf /opt/app/nginx.dev.conf /etc/nginx/http.d/default.conf
  8. nginx
  9. npm run dev
  10. else
  11. ln -sf /opt/app/nginx.prod.conf /etc/nginx/http.d/default.conf
  12. nginx -g "daemon off;"
  13. fi