entrypoint.sh 527 B

12345678910111213141516171819
  1. #!/bin/sh
  2. set -eu
  3. mode="${1:-ui}"
  4. case "$mode" in
  5. ui)
  6. exec frankenphp run --config /etc/Caddyfile
  7. ;;
  8. *)
  9. echo "Unknown mode: $mode" >&2
  10. echo "Usage: entrypoint.sh [ui]" >&2
  11. echo "" >&2
  12. echo "To run an ad-hoc PHP command (e.g. 'php', 'composer', 'vendor/bin/phpunit')," >&2
  13. echo "bypass this dispatcher with '--entrypoint <bin>'. For example:" >&2
  14. echo " docker compose run --rm --entrypoint php ui vendor/bin/phpunit" >&2
  15. exit 1
  16. ;;
  17. esac