-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
33 lines (31 loc) · 1.35 KB
/
docker-compose.yml
File metadata and controls
33 lines (31 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
version: '3'
services:
server:
build: .
container_name: game_container
#image: xiaozhu674/gameserver:latest # 替换为你的镜像名称
user: root # 使用root用户运行容器
ports:
# 默认开放的常用Steam游戏服务器端口
- "27015-27020:27015-27020/tcp" # Steam 匹配和RCON
- "27015-27020:27015-27020/udp" # 游戏流量
volumes:
- ./game_data:/home/steam/games # 游戏数据
- ./game_file:/home/steam/.config # 通用游戏存档路径1。请务必将此宿主目录权限设置为777
- ./game_file:/home/steam/.local # 通用游戏存档路径2。请务必将此宿主目录权限设置为777
environment:
- TZ=Asia/Shanghai # 设置时区
- AUTO_UPDATE=true # 自动更新脚本 (true/false)
- GAME_DIR= # 游戏目录路径 (可选,如果设置则自动执行)
- START_SCRIPT= # 启动脚本路径 (可选,如果设置则自动执行)
stdin_open: true # 保持STDIN打开
tty: true # 分配TTY
# 如果需要,取消注释下面的行来限制资源
# deploy:
# resources:
# limits:
# cpus: '4.0'
# memory: 8G
# reservations:
# cpus: '2.0'
# memory: 4G