Files
GameServerManager/docker-compose_develop.yml
2025-07-17 12:10:44 +08:00

42 lines
1.7 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
volumes:
gsm3_data:
driver: local
services:
management_panel:
build:
context: .
args:
DEV_MODE: ${DEV_MODE:-false} # 通过环境变量控制开发模式默认为false
container_name: gsm3_management_panel
#image: gsm3/management-panel:latest # 替换为你的镜像名称
user: root
ports:
# GSM3管理面板端口
- "3001:3001" # GSM3 Web管理界面
- "5173:5173" # Vite开发服务器端口开发模式
volumes:
- ./game_file:/root/.config # 通用游戏存档路径1。请务必将此宿主目录权限设置为777
- ./game_file:/root/.local # 通用游戏存档路径2。请务必将此宿主目录权限设置为777
- gsm3_data:/root/GSManager/server/data # GSM3数据目录使用命名卷
# 开发模式下的源代码挂载(用于热重载)
- ./client:/root/GSManager/client # 前端源代码挂载
- ./server:/root/GSManager/server # 后端源代码挂载
- ./package.json:/root/GSManager/package.json # 根package.json挂载
- ./package-lock.json:/root/GSManager/package-lock.json # 根package-lock.json挂载
environment:
- TZ=Asia/Shanghai # 设置时区
- SERVER_PORT=3001 # GSM3服务端口
stdin_open: true # 保持STDIN打开
tty: true # 分配TTY
restart: unless-stopped # 自动重启策略
# 如果需要,取消注释下面的行来限制资源
# deploy:
# resources:
# limits:
# cpus: '4.0'
# memory: 8G
# reservations:
# cpus: '2.0'
# memory: 4G