🐳 Work about Docker. 优化docker-compose network 策略

This commit is contained in:
lbw 2023-08-03 10:27:20 +08:00
parent 4882e3323a
commit cfaa83c798

View File

@ -11,6 +11,8 @@ services:
image: pig-mysql
ports:
- 3306:3306
networks:
- spring_cloud_default
pig-redis:
image: redis:7.0.0
@ -19,6 +21,8 @@ services:
restart: always
container_name: pig-redis
hostname: pig-redis
networks:
- spring_cloud_default
pig-register:
build:
@ -29,6 +33,8 @@ services:
container_name: pig-register
hostname: pig-register
image: pig-register
networks:
- spring_cloud_default
pig-gateway:
build:
@ -39,6 +45,8 @@ services:
container_name: pig-gateway
hostname: pig-gateway
image: pig-gateway
networks:
- spring_cloud_default
pig-auth:
build:
@ -47,6 +55,8 @@ services:
container_name: pig-auth
hostname: pig-auth
image: pig-auth
networks:
- spring_cloud_default
pig-upms:
build:
@ -55,6 +65,8 @@ services:
container_name: pig-upms
hostname: pig-upms
image: pig-upms
networks:
- spring_cloud_default
pig-monitor:
build:
@ -65,6 +77,8 @@ services:
container_name: pig-monitor
hostname: pig-monitor
image: pig-monitor
networks:
- spring_cloud_default
pig-codegen:
build:
@ -73,6 +87,8 @@ services:
container_name: pig-codegen
hostname: pig-codegen
image: pig-codegen
networks:
- spring_cloud_default
pig-daemon-quartz:
build:
@ -80,3 +96,10 @@ services:
restart: always
image: pig-quartz
container_name: pig-quartz
networks:
- spring_cloud_default
networks:
spring_cloud_default:
name: spring_cloud_default
driver: bridge