deploy: allow services to reach host infrastructure

This commit is contained in:
2026-07-30 23:11:16 +08:00
parent c54251e057
commit 2c7915cedb
+3
View File
@@ -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}