docker-compose.yaml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. version: '3'
  2. services:
  3. php:
  4. build: php
  5. depends_on:
  6. - db
  7. - redis
  8. volumes:
  9. # Entrypoint
  10. - ../php/entrypoint.sh:/entrypoint.sh
  11. - ../db/wait_for_db.sh:/wait_for_db.sh
  12. - ../social/install.sh:/var/entrypoint.d/0_social_install.sh
  13. - ./coverage.sh:/var/tooling/coverage.sh
  14. - ./phpstan.sh:/var/tooling/phpstan.sh
  15. - ./acceptance.sh:/var/tooling/acceptance.sh
  16. # Main files
  17. - ../../:/var/www/social
  18. - /var/www/social/docker # exclude docker folder
  19. - ./xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
  20. env_file:
  21. - social.env
  22. - db.env
  23. command: /entrypoint.sh
  24. nginx:
  25. image: nginx:alpine
  26. depends_on:
  27. - php
  28. restart: always
  29. tty: false
  30. volumes:
  31. # Nginx
  32. - ../nginx/nginx.conf:/var/nginx/social.conf
  33. - ../nginx/domain.sh:/var/nginx/domain.sh
  34. # Certbot
  35. - ../certbot/www:/var/www/certbot
  36. - ../certbot/.files:/etc/letsencrypt
  37. # social
  38. - ../../public:/var/www/social/public
  39. env_file:
  40. - ../bootstrap/bootstrap.env
  41. command: /bin/sh -c '/var/nginx/domain.sh; nginx -g "daemon off;"'
  42. pa11y:
  43. build: pa11y
  44. depends_on:
  45. - nginx
  46. volumes:
  47. - ../../tests/screenshots:/screenshots
  48. - ./accessibility.sh:/accessibility.sh
  49. - ./generate_pa11y-ci-config.php:/generate_pa11y-ci-config.php
  50. - /pa11y
  51. cap_add:
  52. - SYS_ADMIN
  53. db:
  54. image: postgres:alpine
  55. environment:
  56. - PGDATA=/var/lib/postgres/data
  57. env_file:
  58. - db.env
  59. volumes:
  60. - database:/var/lib/postgres/data
  61. redis:
  62. image: redis:alpine
  63. tty: false
  64. volumes:
  65. database: