entrypoint.dev.sh 343 B

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