docker-compose.yml 2.6 KB

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