appstore-1panel/apps/nacos/2.4.0/docker-compose.yml
萌森 b84540be31 修复 Nacos 网络模式
避免 客户端会根据服务端的配置自动计算其他端口进行通信 导致无法连接

Signed-off-by: 萌森 <qyg2297248353@163.com>
2024-07-31 17:36:44 +08:00

30 lines
736 B
YAML

version: "3.8"
networks:
1panel-network:
external: true
services:
nacos:
image: nacos/nacos-server:v2.4.0
container_name: ${CONTAINER_NAME}
restart: always
labels:
createdBy: "Apps"
network_mode: ${NETWORK_MODE}
ports:
- ${PANEL_APP_PORT_HTTP}:8848
- ${PANEL_APP_PORT_GRPC_CLIENT}:9848
- ${PANEL_APP_PORT_GRPC_SERVER}:9849
env_file:
- /etc/1panel/envs/global.env
- ${ENV_FILE:-/etc/1panel/envs/default.env}
volumes:
- ${NACOS_ROOT_PATH}/logs:/home/nacos/logs
- ${NACOS_ROOT_PATH}/data:/home/nacos/data
environment:
- MODE=standalone
- NACOS_SERVER_PORT=8848
- NACOS_AUTH_ENABLE=true
- SPRING_DATASOURCE_PLATFORM=mysql