docker-compose.fragment.sh 825 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #!/usr/bin/sh
  2. if [ "${LE_CERT}" -ne 0 ]; then
  3. cat <<EOF
  4. php:
  5. build: docker/php
  6. EOF
  7. else
  8. cat <<EOF
  9. php:
  10. image: gsocial/php
  11. EOF
  12. fi
  13. # If the user wants a DB docker container
  14. if echo "${DOCKER}" | grep -Fvq '"db"'; then
  15. cat <<EOF
  16. depends_on:
  17. - db
  18. EOF
  19. fi
  20. cat <<EOF
  21. restart: always
  22. tty: true
  23. ports:
  24. - ${PHP_PORT}:9000
  25. volumes:
  26. # Entrypoint
  27. - ./docker/php/entrypoint.sh:/entrypoint.sh
  28. - ./docker/db/wait_for_db.sh:/wait_for_db.sh
  29. - ./docker/social/install.sh:/var/entrypoint.d/social_install.sh
  30. # Main files
  31. - .:/var/www/social
  32. env_file:
  33. - ./docker/social/social.env
  34. - ./docker/db/db.env
  35. command: /entrypoint.sh
  36. EOF