docker-compose.yml 2.3 KB

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