From 3a9a81ee358bde2553a0687f4cabde698e273169 Mon Sep 17 00:00:00 2001 From: ginnoir Date: Thu, 4 Jun 2026 23:58:24 -0500 Subject: [PATCH] feat(roms): add RomM stack (romm + mariadb) over /storage1/Emulation New per-domain stack centralizing the emulation/ROM library: - romm (rommapp/romm:4) + dedicated MariaDB; RomM bundles its own Redis - library mounts existing EmuDeck tree /storage1/Emulation (RomM Structure A) read-write; tiered binds (config->/config, blobs->/storage1/labdata) - env_file-only config (no ${VAR}) so the git stack needs no Portainer UI env vars - Hasheous metadata enabled; IGDB/SteamGridDB/ScreenScraper scaffolded empty - Caddy: roms.ginnoir.com internal_only -> romm:8080; regenerated bookmarks --- Caddyfile | 8 +++++ bookmarks-domains.html | 5 +++ bookmarks-ports.html | 5 +++ stacks/roms/docker-compose.yml | 64 ++++++++++++++++++++++++++++++++++ stacks/roms/stack.env | 34 ++++++++++++++++++ 5 files changed, 116 insertions(+) create mode 100644 stacks/roms/docker-compose.yml create mode 100644 stacks/roms/stack.env diff --git a/Caddyfile b/Caddyfile index 9ac450c..79587fa 100644 --- a/Caddyfile +++ b/Caddyfile @@ -116,6 +116,14 @@ stash.ginnoir.com { reverse_proxy stash:6970 } +# ============================================================= +# GAMES / ROMS — internal only +# ============================================================= +roms.ginnoir.com { + import internal_only + reverse_proxy romm:8080 +} + # ============================================================= # NOTIFICATIONS & RSS — public # ============================================================= diff --git a/bookmarks-domains.html b/bookmarks-domains.html index f93001d..8f67d9c 100644 --- a/bookmarks-domains.html +++ b/bookmarks-domains.html @@ -51,6 +51,11 @@
stash

+

GAMES / ROMS (internal)

+

+

roms +

+

NOTIFICATIONS & RSS (public)

ntfy diff --git a/bookmarks-ports.html b/bookmarks-ports.html index e7d368b..2049705 100644 --- a/bookmarks-ports.html +++ b/bookmarks-ports.html @@ -88,5 +88,10 @@
resume

+

Roms

+

+

romm :8997 +

+

diff --git a/stacks/roms/docker-compose.yml b/stacks/roms/docker-compose.yml new file mode 100644 index 0000000..1064c31 --- /dev/null +++ b/stacks/roms/docker-compose.yml @@ -0,0 +1,64 @@ +# roms stack — RomM ROM library manager + its dedicated MariaDB. +# +# RomM bundles its own Redis (persisted via /redis-data), so there is no cache +# container here. The library is the existing EmuDeck tree at /storage1/Emulation, +# which is already RomM "Structure A" (a roms/ parent with per-platform subfolders). +# It is mounted READ-WRITE per request, so RomM file operations (rename/move/ +# delete, manual matches) can mutate the tree — default scanning stays read-only. +# +# All secrets/config come from env_file (stack.env) using container-exact var +# names (DB_PASSWD, MARIADB_PASSWORD, ...), so this git stack needs NO Portainer +# UI env vars for ${VAR} substitution. See memory portainer-env-interpolation. +# +# Tiered binds: DB + RomM config + bundled-redis -> /config/romm (SSD); +# RomM blobs (downloaded art + user saves/states) -> /storage1/labdata/romm (ZFS). +# The labdata/romm/* targets are auto-created by Docker as root on first start. +# +# Only romm joins `edge` (Caddy proxies romm:8080); romm-db stays on `roms` only. + +services: + romm: + image: rommapp/romm:4 + container_name: romm + restart: unless-stopped + networks: [roms, edge] + depends_on: + romm-db: + condition: service_healthy + env_file: + - stack.env + environment: + - DB_HOST=romm-db + - DB_NAME=romm + volumes: + - /storage1/Emulation:/romm/library + - /storage1/labdata/romm/resources:/romm/resources + - /storage1/labdata/romm/assets:/romm/assets + - /config/romm/config:/romm/config + - /config/romm/redis:/redis-data + ports: + - "8997:8080" + + romm-db: + image: mariadb:latest + container_name: romm-db + restart: unless-stopped + networks: [roms] + env_file: + - stack.env + command: ["--max-allowed-packet=64M"] + healthcheck: + test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"] + interval: 10s + timeout: 5s + retries: 5 + volumes: + - /config/romm/mariadb:/var/lib/mysql + +networks: + roms: + name: roms + driver: bridge + edge: + name: edge + external: true diff --git a/stacks/roms/stack.env b/stacks/roms/stack.env new file mode 100644 index 0000000..676bc93 --- /dev/null +++ b/stacks/roms/stack.env @@ -0,0 +1,34 @@ +# roms stack secrets — RomM + MariaDB. +# Var names are exactly what each container reads, injected via env_file (no ${VAR} +# interpolation), so this git stack needs no Portainer UI env vars. +TZ=America/Chicago + +# ── RomM <-> MariaDB connection ───────────────────────────────────────────── +# DB_HOST / DB_NAME are set literally in docker-compose.yml. +DB_USER=romm-user +DB_PASSWD=75d3308745e974b52d10ec78100dc106 + +# RomM session/JWT signing key. Rotate with: openssl rand -hex 32 +# (rotating invalidates all logged-in sessions) +ROMM_AUTH_SECRET_KEY=587a4e5a51f932ec8bc0b785364b20911053b2523aee0a5254b5474f8c04b97f + +# ── MariaDB init ──────────────────────────────────────────────────────────── +# MARIADB_PASSWORD MUST equal DB_PASSWD above. +MARIADB_ROOT_PASSWORD=6f54df0f4a31c761061b87ac2d7dd7e1 +MARIADB_DATABASE=romm +MARIADB_USER=romm-user +MARIADB_PASSWORD=75d3308745e974b52d10ec78100dc106 + +# ── Metadata sources ──────────────────────────────────────────────────────── +# Hasheous is free and needs no account — leave enabled so RomM matches on day one. +HASHEOUS_API_ENABLED=true + +# Fill these later. RomM runs on Hasheous alone until then. +# IGDB: create a Twitch dev app -> https://dev.twitch.tv/console/apps +# SteamGridDB: API key -> https://www.steamgriddb.com/profile/preferences/api +# ScreenScraper: your account username/password -> https://www.screenscraper.fr +IGDB_CLIENT_ID= +IGDB_CLIENT_SECRET= +STEAMGRIDDB_API_KEY= +SCREENSCRAPER_USER= +SCREENSCRAPER_PASSWORD=