entrypoint.sh 389 B

1234567891011121314
  1. #!/usr/bin/env bash
  2. if [ -z "$1" ]; then
  3. if [ -z "$FLASK_APP_PATH" ]; then
  4. echo "Environment Variable \`FLASK_APP_PATH\` should not be empty"
  5. elif [ -f "$FLASK_APP_PATH" ]; then
  6. python "$FLASK_APP_PATH"
  7. else
  8. echo "Environment Variable \`FLASK_APP_PATH\` is set to \"$FLASK_APP_PATH\" but it does not exist"
  9. exit
  10. fi
  11. else
  12. bash -c "$1"
  13. fi