2
0

docker-compose.yml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. ## Mark Shust's Docker Configuration for Magento
  2. ## (https://github.com/markshust/docker-magento)
  3. ##
  4. ## Version 41.0.2
  5. ## To use SSH, see https://github.com/markshust/docker-magento#ssh
  6. ## Linux users, see https://github.com/markshust/docker-magento#linux
  7. ## If you changed the default Docker network, you may need to replace
  8. ## 172.17.0.1 in this file with the result of:
  9. ## docker network inspect bridge --format='{{(index .IPAM.Config 0).Gateway}}'
  10. version: "3"
  11. services:
  12. app:
  13. image: markoshust/magento-nginx:1.18-5
  14. ports:
  15. - "80:8000"
  16. - "443:8443"
  17. volumes: &appvolumes
  18. - ~/.composer:/var/www/.composer:cached
  19. - ~/.ssh/id_rsa:/var/www/.ssh/id_rsa:cached
  20. - ~/.ssh/known_hosts:/var/www/.ssh/known_hosts:cached
  21. - appdata:/var/www/html
  22. - sockdata:/sock
  23. - ssldata:/etc/nginx/certs
  24. extra_hosts: &appextrahosts
  25. - "host.docker.internal:172.17.0.1"
  26. ## M1 Mac support to fix Docker delay, see #566
  27. - "app:172.17.0.1"
  28. - "phpfpm:172.17.0.1"
  29. - "db:172.17.0.1"
  30. - "redis:172.17.0.1"
  31. - "elasticsearch:172.17.0.1"
  32. - "rabbitmq:172.17.0.1"
  33. ## Selenium support, replace "magento.test" with URL of your site
  34. - "magento.test:172.17.0.1"
  35. phpfpm:
  36. image: markoshust/magento-php:7.4-fpm-12
  37. volumes: *appvolumes
  38. extra_hosts: *appextrahosts
  39. env_file: env/phpfpm.env
  40. db:
  41. image: mariadb:10.4
  42. command: --max_allowed_packet=64M
  43. ports:
  44. - "3306:3306"
  45. env_file: env/db.env
  46. volumes:
  47. - dbdata:/var/lib/mysql
  48. extra_hosts: *appextrahosts
  49. redis:
  50. image: redis:5.0-alpine
  51. ports:
  52. - "6379:6379"
  53. extra_hosts: *appextrahosts
  54. elasticsearch:
  55. image: markoshust/magento-elasticsearch:7.9.3-1
  56. ports:
  57. - "9200:9200"
  58. - "9300:9300"
  59. environment:
  60. - "discovery.type=single-node"
  61. ## Set custom heap size to avoid memory errors
  62. - "ES_JAVA_OPTS=-Xms1g -Xmx1g"
  63. ## Avoid test failures due to small disks
  64. ## More info at https://github.com/markshust/docker-magento/issues/488
  65. - "cluster.routing.allocation.disk.threshold_enabled=false"
  66. - "index.blocks.read_only_allow_delete"
  67. extra_hosts: *appextrahosts
  68. rabbitmq:
  69. image: rabbitmq:3.8.22-management-alpine
  70. ports:
  71. - "15672:15672"
  72. - "5672:5672"
  73. volumes:
  74. - rabbitmqdata:/var/lib/rabbitmq
  75. environment:
  76. - RABBITMQ_VM_MEMORY_HIGH_WATERMARK=1GB
  77. extra_hosts: *appextrahosts
  78. mailcatcher:
  79. image: sj26/mailcatcher
  80. ports:
  81. - "1080:1080"
  82. extra_hosts: *appextrahosts
  83. ## Selenium support, uncomment to enable
  84. #selenium:
  85. # image: selenium/standalone-chrome-debug:3.8.1
  86. # ports:
  87. # - "5900:5900"
  88. # extra_hosts: *appextrahosts
  89. volumes:
  90. appdata:
  91. dbdata:
  92. rabbitmqdata:
  93. sockdata:
  94. ssldata: