Skip to content

Commit

Permalink
Define network to prevent overlap / name collision with other running…
Browse files Browse the repository at this point in the history
… projects
  • Loading branch information
mollux committed Feb 17, 2024
1 parent 9400599 commit 8bcecb7
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 @@ -58,6 +62,8 @@ services:
depends_on:
mautic_web:
condition: service_healthy
networks:
- default

mautic_worker:
image: mautic/mautic:5-apache
Expand All @@ -69,6 +75,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 @@ -67,6 +73,8 @@ services:
depends_on:
mautic_web:
condition: service_healthy
networks:
- default

mautic_worker:
image: mautic/mautic:5-fpm
Expand All @@ -78,7 +86,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,11 +24,15 @@ services:
interval: 5s
timeout: 5s
retries: 10
networks:
- default

rabbitmq:
image: rabbitmq:3
volumes:
- rabbitmq-data:/var/lib/rabbitmq
networks:
- default

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

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

mautic_worker:
image: mautic/mautic:5-apache
Expand All @@ -74,7 +82,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 8bcecb7

Please sign in to comment.