Skip to content

Commit

Permalink
Merge pull request #266 from mautic/define-network
Browse files Browse the repository at this point in the history
Define network to prevent overlap / name collision with other running projects
  • Loading branch information
mollux authored Feb 23, 2024
2 parents aae57e4 + 8bcecb7 commit 6ebb1d6
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 3 deletions.
4 changes: 3 additions & 1 deletion examples/basic/.env
Original file line number Diff line number Diff line change
@@ -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
Expand Down
12 changes: 12 additions & 0 deletions examples/basic/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ services:
interval: 5s
timeout: 5s
retries: 10
networks:
- default

mautic_web:
image: mautic/mautic:5-apache
Expand All @@ -47,6 +49,8 @@ services:
depends_on:
db:
condition: service_healthy
networks:
- default

mautic_cron:
image: mautic/mautic:5-apache
Expand All @@ -60,6 +64,8 @@ services:
depends_on:
mautic_web:
condition: service_healthy
networks:
- default

mautic_worker:
image: mautic/mautic:5-apache
Expand All @@ -73,6 +79,12 @@ services:
depends_on:
mautic_web:
condition: service_healthy
networks:
- default

volumes:
mysql-data:

networks:
default:
name: ${COMPOSE_PROJECT_NAME}-docker
4 changes: 3 additions & 1 deletion examples/fpm-nginx/.env
Original file line number Diff line number Diff line change
@@ -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
Expand Down
14 changes: 14 additions & 0 deletions examples/fpm-nginx/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ services:
interval: 5s
timeout: 5s
retries: 10
networks:
- default

nginx:
image: nginx
Expand All @@ -35,6 +37,8 @@ services:
- mautic_web
ports:
- 8002:80
networks:
- default

mautic_web:
image: mautic/mautic:5-fpm
Expand All @@ -56,6 +60,8 @@ services:
depends_on:
db:
condition: service_healthy
networks:
- default

mautic_cron:
image: mautic/mautic:5-fpm
Expand All @@ -69,6 +75,8 @@ services:
depends_on:
mautic_web:
condition: service_healthy
networks:
- default

mautic_worker:
image: mautic/mautic:5-fpm
Expand All @@ -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
4 changes: 3 additions & 1 deletion examples/rabbitmq-worker/.env
Original file line number Diff line number Diff line change
@@ -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
Expand Down
14 changes: 14 additions & 0 deletions examples/rabbitmq-worker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,17 @@ services:
interval: 5s
timeout: 5s
retries: 10
networks:
- default

rabbitmq:
image: rabbitmq:3
environment:
- RABBITMQ_DEFAULT_VHOST=${RABBITMQ_DEFAULT_VHOST}
volumes:
- rabbitmq-data:/var/lib/rabbitmq
networks:
- default

mautic_web:
image: mautic/mautic:5-apache
Expand All @@ -54,6 +58,8 @@ services:
depends_on:
db:
condition: service_healthy
networks:
- default

mautic_cron:
image: mautic/mautic:5-apache
Expand All @@ -67,6 +73,8 @@ services:
depends_on:
mautic_web:
condition: service_healthy
networks:
- default

mautic_worker:
image: mautic/mautic:5-apache
Expand All @@ -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

0 comments on commit 6ebb1d6

Please sign in to comment.