docker-compose.yml 2.4 KB

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