Simple problems require simple solutions
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

112 lines
3.1 KiB

  1. services:
  2. laravel.test:
  3. build:
  4. context: ./vendor/laravel/sail/runtimes/8.3
  5. dockerfile: Dockerfile
  6. args:
  7. WWWGROUP: '${WWWGROUP}'
  8. image: sail-8.3/app
  9. extra_hosts:
  10. - 'host.docker.internal:host-gateway'
  11. ports:
  12. - '${APP_PORT:-80}:80'
  13. - '${VITE_PORT:-5173}:${VITE_PORT:-5173}'
  14. environment:
  15. WWWUSER: '${WWWUSER}'
  16. LARAVEL_SAIL: 1
  17. XDEBUG_MODE: '${SAIL_XDEBUG_MODE:-off}'
  18. XDEBUG_CONFIG: '${SAIL_XDEBUG_CONFIG:-client_host=host.docker.internal}'
  19. IGNITION_LOCAL_SITES_PATH: '${PWD}'
  20. volumes:
  21. - '.:/var/www/html'
  22. networks:
  23. - sail
  24. depends_on:
  25. - mysql
  26. - redis
  27. - meilisearch
  28. - mailpit
  29. - selenium
  30. mysql:
  31. image: 'mysql/mysql-server:8.0'
  32. ports:
  33. - '${FORWARD_DB_PORT:-3306}:3306'
  34. environment:
  35. MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}'
  36. MYSQL_ROOT_HOST: '%'
  37. MYSQL_DATABASE: '${DB_DATABASE}'
  38. MYSQL_USER: '${DB_USERNAME}'
  39. MYSQL_PASSWORD: '${DB_PASSWORD}'
  40. MYSQL_ALLOW_EMPTY_PASSWORD: 1
  41. volumes:
  42. - 'sail-mysql:/var/lib/mysql'
  43. - './vendor/laravel/sail/database/mysql/create-testing-database.sh:/docker-entrypoint-initdb.d/10-create-testing-database.sh'
  44. networks:
  45. - sail
  46. healthcheck:
  47. test:
  48. - CMD
  49. - mysqladmin
  50. - ping
  51. - '-p${DB_PASSWORD}'
  52. retries: 3
  53. timeout: 5s
  54. redis:
  55. image: 'redis:alpine'
  56. ports:
  57. - '${FORWARD_REDIS_PORT:-6379}:6379'
  58. volumes:
  59. - 'sail-redis:/data'
  60. networks:
  61. - sail
  62. healthcheck:
  63. test:
  64. - CMD
  65. - redis-cli
  66. - ping
  67. retries: 3
  68. timeout: 5s
  69. meilisearch:
  70. image: 'getmeili/meilisearch:latest'
  71. ports:
  72. - '${FORWARD_MEILISEARCH_PORT:-7700}:7700'
  73. environment:
  74. MEILI_NO_ANALYTICS: '${MEILISEARCH_NO_ANALYTICS:-false}'
  75. volumes:
  76. - 'sail-meilisearch:/meili_data'
  77. networks:
  78. - sail
  79. healthcheck:
  80. test:
  81. - CMD
  82. - wget
  83. - '--no-verbose'
  84. - '--spider'
  85. - 'http://127.0.0.1:7700/health'
  86. retries: 3
  87. timeout: 5s
  88. mailpit:
  89. image: 'axllent/mailpit:latest'
  90. ports:
  91. - '${FORWARD_MAILPIT_PORT:-1025}:1025'
  92. - '${FORWARD_MAILPIT_DASHBOARD_PORT:-8025}:8025'
  93. networks:
  94. - sail
  95. selenium:
  96. image: selenium/standalone-chrome
  97. extra_hosts:
  98. - 'host.docker.internal:host-gateway'
  99. volumes:
  100. - '/dev/shm:/dev/shm'
  101. networks:
  102. - sail
  103. networks:
  104. sail:
  105. driver: bridge
  106. volumes:
  107. sail-mysql:
  108. driver: local
  109. sail-redis:
  110. driver: local
  111. sail-meilisearch:
  112. driver: local