Run Steam Big Picture as dedicated steam user with persistent home-backed storage and document first-run bootstrap behavior. Co-authored-by: Cursor <cursoragent@cursor.com>
116 lines
3.1 KiB
YAML
116 lines
3.1 KiB
YAML
x-game-template: &game-template
|
|
build: .
|
|
user: "root"
|
|
restart: unless-stopped
|
|
privileged: true
|
|
ipc: shareable
|
|
environment:
|
|
NVIDIA_DRIVER_CAPABILITIES: all
|
|
DISPLAY: ":99"
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: '10'
|
|
memory: 28g
|
|
reservations:
|
|
devices:
|
|
- driver: nvidia
|
|
count: 1
|
|
capabilities: [gpu, compute, utility, video]
|
|
# Добавляем healthcheck для лучшей стабильности
|
|
healthcheck:
|
|
test: ["CMD", "pgrep", "sunshine"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
|
|
services:
|
|
player1:
|
|
<<: *game-template
|
|
container_name: game-player-1
|
|
environment:
|
|
NVIDIA_DRIVER_CAPABILITIES: all
|
|
DISPLAY: ":99"
|
|
NVIDIA_VISIBLE_DEVICES: "1"
|
|
RENDER_DEVICE_INDEX: "0"
|
|
ports:
|
|
- "47984-47990:47984-47990/tcp"
|
|
- "48010:48010/tcp"
|
|
- "48010:48010/udp"
|
|
- "47998-48000:47998-48000/udp"
|
|
volumes:
|
|
- /DATA/AppData/game-server/players/p1_steam:/home/steam/.local/share/Steam
|
|
- /DATA/AppData/game-server/players/p1_config:/root/.config/sunshine
|
|
# Добавляем логирование для отладки
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
|
|
player2:
|
|
<<: *game-template
|
|
container_name: game-player-2
|
|
environment:
|
|
NVIDIA_DRIVER_CAPABILITIES: all
|
|
DISPLAY: ":99"
|
|
NVIDIA_VISIBLE_DEVICES: "2"
|
|
RENDER_DEVICE_INDEX: "0"
|
|
ports:
|
|
- "48014-48020:47984-47990/tcp"
|
|
- "48040:48010/tcp"
|
|
- "48040:48010/udp"
|
|
- "48028-48030:47998-48000/udp"
|
|
volumes:
|
|
- /DATA/AppData/game-server/players/p2_steam:/home/steam/.local/share/Steam
|
|
- /DATA/AppData/game-server/players/p2_config:/root/.config/sunshine
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
|
|
player3:
|
|
<<: *game-template
|
|
container_name: game-player-3
|
|
environment:
|
|
NVIDIA_DRIVER_CAPABILITIES: all
|
|
DISPLAY: ":99"
|
|
NVIDIA_VISIBLE_DEVICES: "3"
|
|
RENDER_DEVICE_INDEX: "0"
|
|
ports:
|
|
- "48044-48050:47984-47990/tcp"
|
|
- "48070:48010/tcp"
|
|
- "48070:48010/udp"
|
|
- "48058-48060:47998-48000/udp"
|
|
volumes:
|
|
- /DATA/AppData/game-server/players/p3_steam:/home/steam/.local/share/Steam
|
|
- /DATA/AppData/game-server/players/p3_config:/root/.config/sunshine
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
|
|
player4:
|
|
<<: *game-template
|
|
container_name: game-player-4
|
|
environment:
|
|
NVIDIA_DRIVER_CAPABILITIES: all
|
|
DISPLAY: ":99"
|
|
NVIDIA_VISIBLE_DEVICES: "4"
|
|
RENDER_DEVICE_INDEX: "0"
|
|
ports:
|
|
- "48074-48080:47984-47990/tcp"
|
|
- "48100:48010/tcp"
|
|
- "48100:48010/udp"
|
|
- "48088-48090:47998-48000/udp"
|
|
volumes:
|
|
- /DATA/AppData/game-server/players/p4_steam:/home/steam/.local/share/Steam
|
|
- /DATA/AppData/game-server/players/p4_config:/root/.config/sunshine
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|