gates / gates (push) Successful in 6s
docmost 768M, romm 1024M, termix 256M, uptime-kuma 384M, grafana 768M, tandoor 1280M; totals updated. The 23 mem_request changes wait for the operator (they would refuse the household set's sixth app on an 8 GB box). Immich waits for a larger-library measurement. Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
183 lines
7.7 KiB
YAML
183 lines
7.7 KiB
YAML
# ROMM - ROM Manager for Game Libraries
|
|
# Domain: ${SUBDOMAIN}.${DOMAIN}
|
|
# Database: MariaDB + Redis
|
|
# RAM: ~300MB (mem_limit: 1536M total — romm 1024M + mariadb 384M + redis 128M)
|
|
# romm 768M -> 1024M (R-994, 2026-10-17: the 2026-10-13 sizing run measured a peak of 703 MB = 92 % of the old 768M; the new limit keeps it at or under ~70 %). | Pi-compatible: No (MariaDB + heavy)
|
|
#
|
|
# Environment variables:
|
|
# DOMAIN - Your domain (e.g., demo-felhom.eu)
|
|
# HDD_PATH - Drive namespace root (appdata lives here)
|
|
# USERDATA_PATH - Ügyfél-tartalom gyökér (<namespace>/userdata)
|
|
# DB_PASSWORD - MariaDB user password (auto-generated)
|
|
# MYSQL_ROOT_PASSWORD - MariaDB root password (auto-generated)
|
|
# ROMM_AUTH_SECRET_KEY - Auth secret (auto-generated)
|
|
#
|
|
# Storage layout (felhom userdata convention):
|
|
# ROM library → ${USERDATA_PATH}/roms (browsable — drop ROMs here via FileBrowser,
|
|
# one folder per platform: roms/gba/, roms/snes/)
|
|
# BIOS/firmware → ${USERDATA_PATH}/roms-bios (browsable — roms-bios/<platform>/)
|
|
# Cover art etc → ${HDD_PATH}/appdata/romm/resources (app-internal, NOT browsable)
|
|
# App config → romm_config (named volume, NVMe)
|
|
# Saves/states → romm_assets (named volume, NVMe — R-1097)
|
|
# MariaDB data → romm_db_data (named volume, NVMe)
|
|
# Redis data → romm_redis_data (named volume, NVMe)
|
|
#
|
|
# First-time setup:
|
|
# No default login: the first visit creates the admin account, and the box's setup gate keeps
|
|
# everyone but the household out until that is done (`.felhom.yml` setup_gate).
|
|
|
|
services:
|
|
romm:
|
|
image: rommapp/romm:5.3.1
|
|
container_name: romm
|
|
restart: unless-stopped
|
|
depends_on:
|
|
romm-db:
|
|
condition: service_healthy
|
|
romm-redis:
|
|
condition: service_healthy
|
|
entrypoint: ["/bin/sh", "-c"]
|
|
command:
|
|
- |
|
|
if [ ! -f /romm/config/config.yml ]; then
|
|
echo "Creating default config.yml..."
|
|
cat > /romm/config/config.yml << 'CONF'
|
|
exclude:
|
|
platforms: []
|
|
roms: []
|
|
system:
|
|
log_level: INFO
|
|
CONF
|
|
fi
|
|
exec /docker-entrypoint.sh /init
|
|
environment:
|
|
- ROMM_AUTH_SECRET_KEY=${ROMM_AUTH_SECRET_KEY}
|
|
- DB_PASSWD=${DB_PASSWORD}
|
|
- DB_HOST=romm-db
|
|
- DB_PORT=3306
|
|
- DB_NAME=romm
|
|
- DB_USER=romm
|
|
- REDIS_HOST=romm-redis
|
|
- REDIS_PORT=6379
|
|
- ROMM_PORT=8080
|
|
# 2, not the image's default of 4. MEASURED on demo-hp 2026-09-22 (R-635): each warm
|
|
# uvicorn worker holds ~216 MiB, so four of them plus the master reach ~882 MiB and the
|
|
# container was OOM-killed at both 512M and 768M — 37 worker SIGKILLs in five minutes,
|
|
# ~500% CPU, host load 5.2 while otherwise idle. Four workers is a SERVER default; this
|
|
# is one household on one small box. Two workers measure ~450 MiB and fit 768M with
|
|
# real headroom. `/init:143` reads this variable: --workers "${WEB_SERVER_CONCURRENCY:-4}".
|
|
- WEB_SERVER_CONCURRENCY=2
|
|
- IGDB_CLIENT_ID=${IGDB_CLIENT_ID:-}
|
|
- IGDB_CLIENT_SECRET=${IGDB_CLIENT_SECRET:-}
|
|
- STEAMGRIDDB_API_KEY=${STEAMGRIDDB_API_KEY:-}
|
|
- SCREENSCRAPER_USER=${SCREENSCRAPER_USER:-}
|
|
- SCREENSCRAPER_PASSWORD=${SCREENSCRAPER_PASSWORD:-}
|
|
- MOBYGAMES_API_KEY=${MOBYGAMES_API_KEY:-}
|
|
- TZ=Europe/Budapest
|
|
volumes:
|
|
# RomM 5.3.1 reads games from library/roms/<platform>/ and firmware from library/bios/<platform>/
|
|
# (config_manager.py DEFAULT_ROM_STRUCTURE "roms/{platform}/{game}", DEFAULT_FIRMWARE_STRUCTURE
|
|
# "bios/{platform}"). Until 2026-10-16 the drive's roms/ was mounted as library/ itself, so a game
|
|
# put in roms/gba/ as the first steps said sat at library/gba/ and the scan found NOTHING — measured
|
|
# on demo-hp 9201 (R-1089, felhom.eu audits/romm-ghost-2026-10-16/A1). Now roms/<platform>/ IS
|
|
# library/roms/<platform>/. Firmware gets its own drive folder so it stays on the drive and in the
|
|
# backup, as it was when it sat inside roms/ (operator ruling 2026-10-16).
|
|
- ${USERDATA_PATH}/roms:/romm/library/roms
|
|
- ${USERDATA_PATH}/roms-bios:/romm/library/bios
|
|
- ${HDD_PATH}/appdata/romm/resources:/romm/resources
|
|
- romm_config:/romm/config
|
|
# Saves, save states and screenshots (ASSETS_BASE_PATH = /romm/assets, RomM backend/config/__init__.py:39).
|
|
# Until 2026-10-16 they sat in the image's anonymous `/romm` volume, which no app backup takes (R-1097,
|
|
# measured on demo-hp 9201: felhom.eu audits/burndown-apps-2026-10-16/P1). A named volume is in every backup.
|
|
- romm_assets:/romm/assets
|
|
networks:
|
|
- traefik-public
|
|
- romm-internal
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
# 768M, not 512M: romm 5.3.0 does not fit in 512M. Measured on demo-hp 2026-09-22 —
|
|
# OOMKilled true, 4,530 gunicorn worker SIGKILLs in six hours, ~500% CPU in a permanent
|
|
# restart storm, while the web front end still answered 200 so the update read `done`
|
|
# (R-635). 5.0.0 did fit; the version moved and the limit did not.
|
|
memory: 1024M
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--spider", "-q", "http://127.0.0.1:8080/"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 60s
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.romm.rule=Host(`${SUBDOMAIN}.${DOMAIN}`)"
|
|
# R-753: this app reads the LEFTMOST X-Forwarded-For entry, which a stranger writes once traefik keeps the
|
|
# tunnel's chain — so its chain is removed here (it then reads traefik's X-Real-Ip or peer; never forgeable).
|
|
- "traefik.http.middlewares.romm-xff.headers.customrequestheaders.X-Forwarded-For="
|
|
- "traefik.http.routers.romm.middlewares=romm-xff"
|
|
- "traefik.http.routers.romm.entrypoints=websecure"
|
|
- "traefik.http.routers.romm.tls=true"
|
|
- "traefik.http.routers.romm.tls.certresolver=letsencrypt"
|
|
- "traefik.http.services.romm.loadbalancer.server.port=8080"
|
|
|
|
romm-db:
|
|
image: mariadb:11.8
|
|
container_name: romm-db
|
|
restart: unless-stopped
|
|
environment:
|
|
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
|
|
- MYSQL_DATABASE=romm
|
|
- MYSQL_USER=romm
|
|
- MYSQL_PASSWORD=${DB_PASSWORD}
|
|
- TZ=Europe/Budapest
|
|
# MARIADB_AUTO_UPGRADE: on a MAJOR engine move the engine converts its own datadir (~7 s on a
|
|
# small DB, backs its system tables up first). Operator ruling 2026-09-13 on
|
|
# felhom.eu/documentation/audits/SPIKE-r459-mariadb-upgrade-2026-09-06.md. Inert until a
|
|
# major moves — and none may, until Slice 4 (R-448) ships: see CLAUDE.md, engine-major rule.
|
|
- MARIADB_AUTO_UPGRADE=1
|
|
volumes:
|
|
- romm_db_data:/var/lib/mysql
|
|
networks:
|
|
- romm-internal
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 384M
|
|
healthcheck:
|
|
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 30s
|
|
|
|
romm-redis:
|
|
image: redis:7-alpine
|
|
container_name: romm-redis
|
|
restart: unless-stopped
|
|
command: redis-server --appendonly no
|
|
environment:
|
|
- TZ=Europe/Budapest
|
|
volumes:
|
|
- romm_redis_data:/data
|
|
networks:
|
|
- romm-internal
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 128M
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 3
|
|
|
|
volumes:
|
|
romm_config:
|
|
romm_assets:
|
|
romm_db_data:
|
|
romm_redis_data:
|
|
|
|
networks:
|
|
traefik-public:
|
|
external: true
|
|
romm-internal:
|