deploy: allow services to reach host infrastructure
This commit is contained in:
@@ -3,6 +3,9 @@ name: firstleg-${DEPLOY_ENV:-test}
|
||||
x-common: &common
|
||||
restart: unless-stopped
|
||||
networks: [firstleg-network, infra-network]
|
||||
# 测试机复用宿主机的 MySQL、Redis、Nacos 时,容器通过此别名访问宿主机。
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
environment: &common-environment
|
||||
SPRING_PROFILES_ACTIVE: ${SPRING_PROFILES_ACTIVE:-cn}
|
||||
NACOS_SERVER_ADDR: ${NACOS_SERVER_ADDR}
|
||||
|
||||
Reference in New Issue
Block a user