launch.sh 573 B

123456789101112131415161718192021222324
  1. #!/bin/bash
  2. set -e
  3. export PHP_VERSION="8.1"
  4. export CODE="mint-php${PHP_VERSION}"
  5. export USAGE="USAGE: $0 MINT_VERSION TASK"
  6. if [ "$#" -ne 2 ]; then
  7. echo $USAGE
  8. exit 2
  9. fi
  10. if [ "$2" == "fpm" || "$2" == "worker" ]; then
  11. podman run --rm -it --events-backend=file --hostname=mint --network host -v $PWD:/srv:z $CODE /srv/launch.sh $2
  12. elif [ "$1" == "setup" ]; then
  13. cd /srv/www/mint-
  14. elif [ "$1" == "shell" ]; then
  15. podman run --rm -it --events-backend=file --hostname=mint --network host -v $PWD:/srv:z $CODE /bin/bash
  16. else
  17. echo $USAGE
  18. exit 1
  19. fi