docker-compose.yml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. ## Mark Shust's Docker Configuration for Magento
  2. ## (https://github.com/markshust/docker-magento)
  3. ##
  4. ## Version 40.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. version: "3"
  8. services:
  9. app:
  10. image: markoshust/magento-nginx:1.18-5
  11. ports:
  12. - "80:8000"
  13. - "443:8443"
  14. links:
  15. - db
  16. - phpfpm
  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. phpfpm:
  25. image: markoshust/magento-php:7.4-fpm-10
  26. links:
  27. - db
  28. volumes: *appvolumes
  29. ## extra_hosts is required for selenium
  30. ## For extra_hosts, replace "magento.test" with the URL of your site,
  31. ## and also replace 172.17.0.1 with the result of:
  32. ## docker run --rm alpine ip route | awk 'NR==1 {print $3}'
  33. #extra_hosts:
  34. # - "magento.test:172.17.0.1"
  35. db:
  36. image: mariadb:10.4
  37. command: --max_allowed_packet=64M
  38. ports:
  39. - "3306:3306"
  40. env_file: env/db.env
  41. volumes:
  42. - dbdata:/var/lib/mysql
  43. redis:
  44. image: redis:5.0-alpine
  45. elasticsearch:
  46. image: markoshust/magento-elasticsearch:7.9.3-1
  47. ports:
  48. - "9200:9200"
  49. - "9300:9300"
  50. environment:
  51. - "discovery.type=single-node"
  52. ## Set custom heap size to avoid memory errors
  53. - "ES_JAVA_OPTS=-Xms1g -Xmx1g"
  54. ## Avoid test failures due to small disks
  55. ## More info at https://github.com/markshust/docker-magento/issues/488
  56. - "cluster.routing.allocation.disk.threshold_enabled=false"
  57. - "index.blocks.read_only_allow_delete"
  58. rabbitmq:
  59. image: rabbitmq:3.8.22-management-alpine
  60. ports:
  61. - "15672:15672"
  62. - "5672:5672"
  63. volumes:
  64. - rabbitmqdata:/var/lib/rabbitmq
  65. environment:
  66. - RABBITMQ_VM_MEMORY_HIGH_WATERMARK=1GB
  67. mailcatcher:
  68. image: sj26/mailcatcher
  69. ports:
  70. - "1080:1080"
  71. ## Disabling selenium by default as it is not required for all use cases.
  72. ## For extra_hosts, replace "magento.test" with the URL of your site,
  73. ## and also replace 172.17.0.1 with the result of:
  74. ## docker run --rm alpine ip route | awk 'NR==1 {print $3}'
  75. #selenium:
  76. # image: selenium/standalone-chrome-debug:3.8.1
  77. # ports:
  78. # - "5900:5900"
  79. # links:
  80. # - app
  81. # extra_hosts:
  82. # - "magento.test:172.17.0.1"
  83. volumes:
  84. appdata:
  85. dbdata:
  86. rabbitmqdata:
  87. sockdata:
  88. ssldata: