Description
below is my yaml file and host system is windows 10
version: '2.1'
services:
db:
hostname: db.magento2.docker
image: 'mariadb:10.2'
environment:
- MYSQL_ROOT_PASSWORD=magento2
- MYSQL_DATABASE=magento2
- MYSQL_USER=magento2
- MYSQL_PASSWORD=magento2
ports:
- '3306'
volumes:
- '.:/app:delegated'
- 'kp_magento_marketplace-magento-db:/var/lib/mysql'
healthcheck:
test: 'mysqladmin ping -h localhost -pmagento2'
interval: 30s
timeout: 30s
retries: 3
networks:
magento:
aliases:
- db.magento2.docker
redis:
hostname: redis.magento2.docker
image: 'redis:5.0'
volumes:
- '.:/app:delegated'
ports:
- 6379
healthcheck:
test: 'redis-cli ping || exit 1'
interval: 30s
timeout: 30s
retries: 3
networks:
magento:
aliases:
- redis.magento2.docker
elasticsearch:
hostname: elasticsearch.magento2.docker
image: 'magento/magento-cloud-docker-elasticsearch:6.5-1.2.0'
networks:
magento:
aliases:
- elasticsearch.magento2.docker
fpm:
hostname: fpm.magento2.docker
image: 'magento/magento-cloud-docker-php:7.3-fpm-1.2.0'
extends: generic
volumes:
- '.:/app:delegated'
networks:
magento:
aliases:
- fpm.magento2.docker
depends_on:
db:
condition: service_healthy
web:
hostname: web.magento2.docker
image: 'magento/magento-cloud-docker-nginx:1.19-1.2.0'
extends: generic
volumes:
- '.:/app:delegated'
environment:
- WITH_XDEBUG=0
networks:
magento:
aliases:
- web.magento2.docker
depends_on:
fpm:
condition: service_started
varnish:
hostname: varnish.magento2.docker
image: 'magento/magento-cloud-docker-varnish:6.2-1.2.0'
networks:
magento:
aliases:
- varnish.magento2.docker
depends_on:
web:
condition: service_started
tls:
hostname: tls.magento2.docker
image: 'magento/magento-cloud-docker-nginx:1.19-1.2.0'
extends: generic
networks:
magento:
aliases:
- magento2.docker
environment:
UPSTREAM_HOST: varnish
ports:
- '80:80'
- '443:443'
depends_on:
varnish:
condition: service_started
generic:
hostname: generic.magento2.docker
image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0'
env_file: ./.docker/config.env
environment:
- MAGENTO_RUN_MODE=developer
- 'PHP_EXTENSIONS=bcmath bz2 calendar exif gd gettext intl mysqli pcntl pdo_mysql soap sockets sysvmsg sysvsem sysvshm opcache zip redis xsl sodium'
build:
hostname: build.magento2.docker
image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0'
extends: generic
volumes:
- '.:/app:delegated'
networks:
magento-build:
aliases:
- build.magento2.docker
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
elasticsearch:
condition: service_healthy
deploy:
hostname: deploy.magento2.docker
image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0'
extends: generic
volumes:
- '.:/app:delegated'
networks:
magento:
aliases:
- deploy.magento2.docker
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
elasticsearch:
condition: service_healthy
mailhog:
hostname: mailhog.magento2.docker
image: 'mailhog/mailhog:latest'
ports:
- '1025:1025'
- '8025:8025'
networks:
magento:
aliases:
- mailhog.magento2.docker
volumes:
kp_magento_marketplace-magento-db: { }
networks:
magento:
driver: bridge
magento-build:
driver: bridge