mirror of
https://github.com/RetroGameSets/RGSX.git
synced 2026-01-03 19:23:47 +01:00
Implemented environment variable-based configuration to support both Docker and traditional Batocera/RetroBat installations with a single codebase. Key Changes: - Added RGSX_CONFIG_DIR and RGSX_DATA_DIR environment variables - Separate /config and /data volumes in Docker mode - App files now copied into container at build time (not runtime sync) - Simplified directory structure (removed __downloads concept) - Maintained 100% backwards compatibility with non-Docker installations File Structure by Mode: | Location | Docker Mode | Traditional Mode | |-----------------|-----------------|----------------------------------- | | Settings/Config | /config/ | /userdata/saves/ports/rgsx/ | | Game Lists | /config/games/ | /userdata/saves/ports/rgsx/games/ | | Images | /config/images/ | /userdata/saves/ports/rgsx/images/ | | Logs | /config/logs/ | /userdata/roms/ports/RGSX/logs/ | | ROMs | /data/roms/ | /userdata/roms/ | Detection: - Docker mode: Activated when RGSX_CONFIG_DIR or RGSX_DATA_DIR is set - Traditional mode: Default when no Docker env vars present Tested and verified working in both modes.
30 lines
677 B
YAML
30 lines
677 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
rgsx:
|
|
# Option 1: Build from source
|
|
build:
|
|
context: ..
|
|
dockerfile: docker/Dockerfile
|
|
|
|
# Option 2: Use pre-built image (push to your own registry)
|
|
# image: your-registry/rgsx:latest
|
|
|
|
container_name: rgsx
|
|
restart: unless-stopped
|
|
ports:
|
|
- "5000:5000"
|
|
volumes:
|
|
- ./config:/config
|
|
- ./data:/data
|
|
# Optional: Set PUID/PGID for NFS/local storage (not needed for SMB mounts)
|
|
# environment:
|
|
# - PUID=1000
|
|
# - PGID=1000
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:5000/"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|