docker-compose.yml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. ## Mark Shust's Docker Configuration for Magento
  2. ## (https://github.com/markshust/docker-magento)
  3. ##
  4. ## Version 41.1.0
  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-7
  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. ## M1 Mac support to fix Docker delay, see #566
  26. - "app:172.17.0.1"
  27. - "phpfpm:172.17.0.1"
  28. - "db:172.17.0.1"
  29. - "redis:172.17.0.1"
  30. - "elasticsearch:172.17.0.1"
  31. - "rabbitmq:172.17.0.1"
  32. ## Selenium support, replace "magento.test" with URL of your site
  33. - "magento.test:172.17.0.1"
  34. phpfpm:
  35. image: markoshust/magento-php:7.4-fpm-13
  36. volumes: *appvolumes
  37. extra_hosts: *appextrahosts
  38. env_file: env/phpfpm.env
  39. db:
  40. image: mariadb:10.4
  41. command: --max_allowed_packet=64M
  42. ports:
  43. - "3306:3306"
  44. env_file: env/db.env
  45. volumes:
  46. - dbdata:/var/lib/mysql
  47. extra_hosts: *appextrahosts
  48. redis:
  49. image: redis:6.0-alpine
  50. ports:
  51. - "6379:6379"
  52. extra_hosts: *appextrahosts
  53. elasticsearch:
  54. image: markoshust/magento-elasticsearch:7.9.3-1
  55. ports:
  56. - "9200:9200"
  57. - "9300:9300"
  58. environment:
  59. - "discovery.type=single-node"
  60. ## Set custom heap size to avoid memory errors
  61. - "ES_JAVA_OPTS=-Xms1g -Xmx1g"
  62. ## Avoid test failures due to small disks
  63. ## More info at https://github.com/markshust/docker-magento/issues/488
  64. - "cluster.routing.allocation.disk.threshold_enabled=false"
  65. - "index.blocks.read_only_allow_delete"
  66. extra_hosts: *appextrahosts
  67. rabbitmq:
  68. image: rabbitmq:3.8.22-management-alpine
  69. ports:
  70. - "15672:15672"
  71. - "5672:5672"
  72. volumes:
  73. - rabbitmqdata:/var/lib/rabbitmq
  74. env_file: env/rabbitmq.env
  75. extra_hosts: *appextrahosts
  76. mailcatcher:
  77. image: sj26/mailcatcher
  78. ports:
  79. - "1080:1080"
  80. extra_hosts: *appextrahosts
  81. ## Selenium support, uncomment to enable
  82. #selenium:
  83. # image: selenium/standalone-chrome-debug:3.8.1
  84. # ports:
  85. # - "5900:5900"
  86. # extra_hosts: *appextrahosts
  87. volumes:
  88. appdata:
  89. dbdata:
  90. rabbitmqdata:
  91. sockdata:
  92. ssldata: