ci(consul): 更新consul服务启动命令为server模式

修改docker-compose.yml中consul服务的启动命令,添加-server和-bootstrap-expect=1参数以启用server模式
This commit is contained in:
fanfpy 2025-07-17 10:03:53 +08:00
parent a44ac35f39
commit 3eaf044dd8

View File

@ -14,7 +14,7 @@ services:
- "8600:8600/udp" # DNS服务
volumes:
- ./consul/config/${ENV_CONFIG_DIR}:/consul/config
command: "consul agent ${CONSUL_DEV_MODE} -config-dir=/consul/config -client=0.0.0.0"
command: "consul agent -server -bootstrap-expect=1 ${CONSUL_DEV_MODE} -config-dir=/consul/config -client=0.0.0.0"
networks:
- microservice-network
healthcheck:
@ -92,19 +92,19 @@ services:
# environment:
# - SERVICE_NAME=recommend-service
# user-service:
# build: ./services/user-service
# container_name: ari-user-service
# restart: always
# depends_on:
# consul:
# condition: service_healthy
# expose:
# - "8004"
# networks:
# - microservice-network
# environment:
# - SERVICE_NAME=user-service
# user-service:
# build: ./services/user-service
# container_name: ari-user-service
# restart: always
# depends_on:
# consul:
# condition: service_healthy
# expose:
# - "8004"
# networks:
# - microservice-network
# environment:
# - SERVICE_NAME=user-service
frontend:
build: ./services/frontend