diff --git a/examples/basic/.env b/examples/basic/.env index e60515d..2f05cc5 100644 --- a/examples/basic/.env +++ b/examples/basic/.env @@ -1,4 +1,6 @@ -MYSQL_HOST=db +COMPOSE_PROJECT_NAME=basic +COMPOSE_NETWORK=${COMPOSE_PROJECT_NAME}-docker +MYSQL_HOST=db.${COMPOSE_NETWORK} MYSQL_PORT=3306 MYSQL_DATABASE=mautic_db MYSQL_USER=mautic_db_user diff --git a/examples/basic/docker-compose.yml b/examples/basic/docker-compose.yml index 83f0140..cbf7ca9 100644 --- a/examples/basic/docker-compose.yml +++ b/examples/basic/docker-compose.yml @@ -24,6 +24,8 @@ services: interval: 5s timeout: 5s retries: 10 + networks: + - default mautic_web: image: mautic/mautic:5-apache @@ -47,6 +49,8 @@ services: depends_on: db: condition: service_healthy + networks: + - default mautic_cron: image: mautic/mautic:5-apache @@ -60,6 +64,8 @@ services: depends_on: mautic_web: condition: service_healthy + networks: + - default mautic_worker: image: mautic/mautic:5-apache @@ -73,6 +79,12 @@ services: depends_on: mautic_web: condition: service_healthy + networks: + - default volumes: mysql-data: + +networks: + default: + name: ${COMPOSE_PROJECT_NAME}-docker diff --git a/examples/fpm-nginx/.env b/examples/fpm-nginx/.env index e60515d..893e0e0 100644 --- a/examples/fpm-nginx/.env +++ b/examples/fpm-nginx/.env @@ -1,4 +1,6 @@ -MYSQL_HOST=db +COMPOSE_PROJECT_NAME=fpm-nginx +COMPOSE_NETWORK=${COMPOSE_PROJECT_NAME}-docker +MYSQL_HOST=db.${COMPOSE_NETWORK} MYSQL_PORT=3306 MYSQL_DATABASE=mautic_db MYSQL_USER=mautic_db_user diff --git a/examples/fpm-nginx/docker-compose.yml b/examples/fpm-nginx/docker-compose.yml index 94ea5fb..a0e26a9 100644 --- a/examples/fpm-nginx/docker-compose.yml +++ b/examples/fpm-nginx/docker-compose.yml @@ -25,6 +25,8 @@ services: interval: 5s timeout: 5s retries: 10 + networks: + - default nginx: image: nginx @@ -35,6 +37,8 @@ services: - mautic_web ports: - 8002:80 + networks: + - default mautic_web: image: mautic/mautic:5-fpm @@ -56,6 +60,8 @@ services: depends_on: db: condition: service_healthy + networks: + - default mautic_cron: image: mautic/mautic:5-fpm @@ -69,6 +75,8 @@ services: depends_on: mautic_web: condition: service_healthy + networks: + - default mautic_worker: image: mautic/mautic:5-fpm @@ -82,7 +90,13 @@ services: depends_on: mautic_web: condition: service_healthy + networks: + - default volumes: mysql-data: mautic-docroot: + +networks: + default: + name: ${COMPOSE_PROJECT_NAME}-docker diff --git a/examples/rabbitmq-worker/.env b/examples/rabbitmq-worker/.env index 357ba7e..f808bd6 100644 --- a/examples/rabbitmq-worker/.env +++ b/examples/rabbitmq-worker/.env @@ -1,4 +1,6 @@ -MYSQL_HOST=db +COMPOSE_PROJECT_NAME=rabbitmq-worker +COMPOSE_NETWORK=${COMPOSE_PROJECT_NAME}-docker +MYSQL_HOST=db.${COMPOSE_NETWORK} MYSQL_PORT=3306 MYSQL_DATABASE=mautic_db MYSQL_USER=mautic_db_user diff --git a/examples/rabbitmq-worker/docker-compose.yml b/examples/rabbitmq-worker/docker-compose.yml index 3df3c00..841ba82 100644 --- a/examples/rabbitmq-worker/docker-compose.yml +++ b/examples/rabbitmq-worker/docker-compose.yml @@ -24,6 +24,8 @@ services: interval: 5s timeout: 5s retries: 10 + networks: + - default rabbitmq: image: rabbitmq:3 @@ -31,6 +33,8 @@ services: - RABBITMQ_DEFAULT_VHOST=${RABBITMQ_DEFAULT_VHOST} volumes: - rabbitmq-data:/var/lib/rabbitmq + networks: + - default mautic_web: image: mautic/mautic:5-apache @@ -54,6 +58,8 @@ services: depends_on: db: condition: service_healthy + networks: + - default mautic_cron: image: mautic/mautic:5-apache @@ -67,6 +73,8 @@ services: depends_on: mautic_web: condition: service_healthy + networks: + - default mautic_worker: image: mautic/mautic:5-apache @@ -80,7 +88,13 @@ services: depends_on: mautic_web: condition: service_healthy + networks: + - default volumes: mysql-data: rabbitmq-data: + +networks: + default: + name: ${COMPOSE_PROJECT_NAME}-docker