|
| 1 | +version: '2.1' |
| 2 | +services: |
| 3 | + db: |
| 4 | + hostname: db.magento2.docker |
| 5 | + image: 'mariadb:10.2' |
| 6 | + environment: |
| 7 | + - MYSQL_ROOT_PASSWORD=magento2 |
| 8 | + - MYSQL_DATABASE=magento2 |
| 9 | + - MYSQL_USER=magento2 |
| 10 | + - MYSQL_PASSWORD=magento2 |
| 11 | + ports: |
| 12 | + - '3306' |
| 13 | + volumes: |
| 14 | + - '.:/app:delegated' |
| 15 | + - 'mymagento-magento-db:/var/lib/mysql' |
| 16 | + - '.docker/mysql/mariadb.conf.d:/etc/mysql/mariadb.conf.d' |
| 17 | + - '.docker/mysql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d' |
| 18 | + healthcheck: |
| 19 | + test: 'mysqladmin ping -h localhost -pmagento2' |
| 20 | + interval: 30s |
| 21 | + timeout: 30s |
| 22 | + retries: 3 |
| 23 | + networks: |
| 24 | + magento: |
| 25 | + aliases: |
| 26 | + - db.magento2.docker |
| 27 | + redis: |
| 28 | + hostname: redis.magento2.docker |
| 29 | + image: 'redis:5.0' |
| 30 | + volumes: |
| 31 | + - '.:/app:delegated' |
| 32 | + ports: |
| 33 | + - 6379 |
| 34 | + healthcheck: |
| 35 | + test: 'redis-cli ping || exit 1' |
| 36 | + interval: 30s |
| 37 | + timeout: 30s |
| 38 | + retries: 3 |
| 39 | + networks: |
| 40 | + magento: |
| 41 | + aliases: |
| 42 | + - redis.magento2.docker |
| 43 | + elasticsearch: |
| 44 | + hostname: elasticsearch.magento2.docker |
| 45 | + image: 'magento/magento-cloud-docker-elasticsearch:6.5-1.2.0' |
| 46 | + environment: |
| 47 | + - 'ES_PLUGINS=plugin_1 plugin_2' |
| 48 | + networks: |
| 49 | + magento: |
| 50 | + aliases: |
| 51 | + - elasticsearch.magento2.docker |
| 52 | + fpm: |
| 53 | + hostname: fpm.magento2.docker |
| 54 | + image: 'magento/magento-cloud-docker-php:7.3-fpm-1.2.0' |
| 55 | + extends: generic |
| 56 | + volumes: |
| 57 | + - '.:/app:delegated' |
| 58 | + networks: |
| 59 | + magento: |
| 60 | + aliases: |
| 61 | + - fpm.magento2.docker |
| 62 | + depends_on: |
| 63 | + db: |
| 64 | + condition: service_healthy |
| 65 | + web: |
| 66 | + hostname: web.magento2.docker |
| 67 | + image: 'magento/magento-cloud-docker-nginx:1.19-1.2.0' |
| 68 | + extends: generic |
| 69 | + volumes: |
| 70 | + - '.:/app:delegated' |
| 71 | + environment: |
| 72 | + - WITH_XDEBUG=0 |
| 73 | + - NGINX_WORKER_PROCESSES=1 |
| 74 | + - NGINX_WORKER_CONNECTIONS=1024 |
| 75 | + networks: |
| 76 | + magento: |
| 77 | + aliases: |
| 78 | + - web.magento2.docker |
| 79 | + depends_on: |
| 80 | + fpm: |
| 81 | + condition: service_started |
| 82 | + varnish: |
| 83 | + hostname: varnish.magento2.docker |
| 84 | + image: 'magento/magento-cloud-docker-varnish:6.2-1.2.0' |
| 85 | + networks: |
| 86 | + magento: |
| 87 | + aliases: |
| 88 | + - varnish.magento2.docker |
| 89 | + depends_on: |
| 90 | + web: |
| 91 | + condition: service_started |
| 92 | + tls: |
| 93 | + hostname: tls.magento2.docker |
| 94 | + image: 'magento/magento-cloud-docker-nginx:1.19-1.2.0' |
| 95 | + extends: generic |
| 96 | + networks: |
| 97 | + magento: |
| 98 | + aliases: |
| 99 | + - magento2.docker |
| 100 | + environment: |
| 101 | + - NGINX_WORKER_PROCESSES=1 |
| 102 | + - NGINX_WORKER_CONNECTIONS=1024 |
| 103 | + - UPSTREAM_HOST=varnish |
| 104 | + - UPSTREAM_PORT=80 |
| 105 | + ports: |
| 106 | + - '80:80' |
| 107 | + - '443:443' |
| 108 | + depends_on: |
| 109 | + varnish: |
| 110 | + condition: service_started |
| 111 | + generic: |
| 112 | + hostname: generic.magento2.docker |
| 113 | + image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' |
| 114 | + env_file: ./.docker/config.env |
| 115 | + environment: |
| 116 | + - MAGENTO_RUN_MODE=developer |
| 117 | + - 'PHP_EXTENSIONS=bcmath bz2 calendar exif gd gettext intl mysqli pcntl pdo_mysql soap sockets sysvmsg sysvsem sysvshm opcache zip redis xsl sodium' |
| 118 | + build: |
| 119 | + hostname: build.magento2.docker |
| 120 | + image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' |
| 121 | + extends: generic |
| 122 | + volumes: |
| 123 | + - '.:/app:delegated' |
| 124 | + networks: |
| 125 | + magento-build: |
| 126 | + aliases: |
| 127 | + - build.magento2.docker |
| 128 | + depends_on: |
| 129 | + db: |
| 130 | + condition: service_healthy |
| 131 | + redis: |
| 132 | + condition: service_healthy |
| 133 | + elasticsearch: |
| 134 | + condition: service_healthy |
| 135 | + deploy: |
| 136 | + hostname: deploy.magento2.docker |
| 137 | + image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' |
| 138 | + extends: generic |
| 139 | + volumes: |
| 140 | + - '.:/app:delegated' |
| 141 | + networks: |
| 142 | + magento: |
| 143 | + aliases: |
| 144 | + - deploy.magento2.docker |
| 145 | + depends_on: |
| 146 | + db: |
| 147 | + condition: service_healthy |
| 148 | + redis: |
| 149 | + condition: service_healthy |
| 150 | + elasticsearch: |
| 151 | + condition: service_healthy |
| 152 | + mailhog: |
| 153 | + hostname: mailhog.magento2.docker |
| 154 | + image: 'mailhog/mailhog:latest' |
| 155 | + ports: |
| 156 | + - '1025:1025' |
| 157 | + - '8025:8025' |
| 158 | + networks: |
| 159 | + magento: |
| 160 | + aliases: |
| 161 | + - mailhog.magento2.docker |
| 162 | +volumes: |
| 163 | + mymagento-magento-db: { } |
| 164 | +networks: |
| 165 | + magento: |
| 166 | + driver: bridge |
| 167 | + magento-build: |
| 168 | + driver: bridge |
0 commit comments