From 2fa0cefb8f322bdc807a22c471999454a3e59910 Mon Sep 17 00:00:00 2001 From: BryantHe Date: Wed, 6 Dec 2023 01:42:24 +0800 Subject: [PATCH] fix: add network --- docker-compose-mysql.yml | 9 ++++++++- docker-compose-rabbitmq.yml | 8 +++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/docker-compose-mysql.yml b/docker-compose-mysql.yml index 8aa5e39..e2d04e9 100644 --- a/docker-compose-mysql.yml +++ b/docker-compose-mysql.yml @@ -14,8 +14,15 @@ services: - MYSQL_USER=user - MYSQL_PASSWORD=${MYSQL_PASSWORD:-mysql3306} restart: always + networks: + mysql_network: volumes: mysql_data: - driver: local \ No newline at end of file + driver: local + + +networks: + mysql_network: + driver: bridge \ No newline at end of file diff --git a/docker-compose-rabbitmq.yml b/docker-compose-rabbitmq.yml index e6dd539..de186c9 100644 --- a/docker-compose-rabbitmq.yml +++ b/docker-compose-rabbitmq.yml @@ -16,10 +16,16 @@ services: RABBITMQ_DEFAULT_USER: ${RABBITMQ_DEFAULT_USER:-admin} RABBITMQ_DEFAULT_PASS: ${RABBITMQ_DEFAULT_PASS:-admin} restart: on-failure + networks: + rabbitmq_network: volumes: rabbitmq_data: driver: local rabbitmq_log: - driver: local \ No newline at end of file + driver: local + +networks: + rabbitmq_network: + driver: bridge \ No newline at end of file