-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
86 lines (75 loc) · 2.33 KB
/
docker-compose.yml
File metadata and controls
86 lines (75 loc) · 2.33 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
version: '3.8'
services:
# Backend API Server
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: pixelbridge-backend
restart: unless-stopped
ports:
- "3000:3000"
environment:
# Server Config
- NODE_ENV=production
- PORT=3000
# Storage Path (all subdirectories are auto-derived from this)
- STORAGE_PATH=/app/storage
# RetroArch Apple TV
- RETROARCH_IP=${RETROARCH_IP:-192.168.1.100}
- RETROARCH_PORT=${RETROARCH_PORT:-80}
# IGDB API Credentials
- IGDB_CLIENT_ID=${IGDB_CLIENT_ID}
- IGDB_ACCESS_TOKEN=${IGDB_ACCESS_TOKEN}
# ScreenScraper (optional)
- SCREENSCRAPER_DEV_ID=${SCREENSCRAPER_DEV_ID:-}
- SCREENSCRAPER_DEV_PASSWORD=${SCREENSCRAPER_DEV_PASSWORD:-}
- SCREENSCRAPER_USERNAME=${SCREENSCRAPER_USERNAME:-}
- SCREENSCRAPER_PASSWORD=${SCREENSCRAPER_PASSWORD:-}
# File Limits
- MAX_FILE_SIZE=${MAX_FILE_SIZE:-4294967296}
- ALLOWED_EXTENSIONS=${ALLOWED_EXTENSIONS:-.nes,.snes,.sfc,.gb,.gbc,.gba,.iso,.bin,.cue,.smd,.md,.gen,.gg,.cdi,.gdi,.zip,.7z}
# CORS
- CORS_ORIGIN=http://localhost
volumes:
# Persistent storage for ROMs, covers, metadata, saves
- pixelbridge-storage:/app/storage
# Persistent database
- pixelbridge-database:/app/database
networks:
- pixelbridge-network
healthcheck:
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000/api/health', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
# Frontend Web UI
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: pixelbridge-frontend
restart: unless-stopped
ports:
- "80:80" # Binds to all interfaces (0.0.0.0:80) - accessible via IP
depends_on:
backend:
condition: service_healthy
networks:
- pixelbridge-network
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost/"]
interval: 30s
timeout: 3s
retries: 3
start_period: 5s
networks:
pixelbridge-network:
driver: bridge
volumes:
# Named volumes for data persistence
pixelbridge-storage:
driver: local
pixelbridge-database:
driver: local