2
0

docker-entrypoint.sh 411 B

1234567891011121314151617181920
  1. #!/bin/sh
  2. # Run hooks
  3. for file in /hooks/*; do
  4. if [ -x "${file}" ]; then
  5. echo "Running hook ${file}"
  6. "${file}"
  7. fi
  8. done
  9. python3 -u /bootstrap/main.py
  10. BOOTSTRAP_EXIT_CODE=$?
  11. if [ $BOOTSTRAP_EXIT_CODE -ne 0 ]; then
  12. echo "Bootstrap failed with exit code $BOOTSTRAP_EXIT_CODE. Not starting Nginx."
  13. exit $BOOTSTRAP_EXIT_CODE
  14. fi
  15. echo "Bootstrap succeeded. Starting Nginx..."
  16. nginx -g "daemon off;"