Files
Docker-Compose-Stacks/romm-automation-compose.yml

173 lines
6.8 KiB
YAML

# RomM Automation / Intake trial stack
# Purpose: test request -> Romarr -> staging -> validation -> RomM workflow.
# Keep this as a staging/test stack first. Do not point staging output directly at production RomM.
#
# Romarr caveat: upstream documents image romarr/romarr:latest, but the public Docker Hub
# image was not pullable during scaffold creation. The service is included in the stack
# with a profile so the rest of the stack can be started/tested while we confirm the
# Romarr image/build path.
name: romm-automation
services:
ggrequestz:
image: ghcr.io/xtreemmak/ggrequestz:latest
container_name: ggrequestz
restart: unless-stopped
depends_on:
ggrequestz-postgres:
condition: service_healthy
ggrequestz-redis:
condition: service_healthy
ggrequestz-typesense:
condition: service_healthy
ports:
- "${GGREQUESTZ_PORT:-3003}:3000"
environment:
PUID: ${PUID:-1000}
PGID: ${PGID:-1000}
TZ: ${TZ:-America/Chicago}
NODE_ENV: production
APP_PORT: 3000
PUBLIC_SITE_URL: ${GGREQUESTZ_PUBLIC_SITE_URL:-http://localhost:3003}
POSTGRES_HOST: ggrequestz-postgres
POSTGRES_PORT: 5432
POSTGRES_DB: ${GGREQUESTZ_POSTGRES_DB:-ggrequestz}
POSTGRES_USER: ${GGREQUESTZ_POSTGRES_USER:-ggrequestz}
POSTGRES_PASSWORD: ${GGREQUESTZ_POSTGRES_PASSWORD:?set GGREQUESTZ_POSTGRES_PASSWORD in .env}
REDIS_URL: redis://:${GGREQUESTZ_REDIS_PASSWORD:?set GGREQUESTZ_REDIS_PASSWORD in .env}@ggrequestz-redis:6379
TYPESENSE_HOST: ggrequestz-typesense
TYPESENSE_PORT: 8108
TYPESENSE_PROTOCOL: http
TYPESENSE_API_KEY: ${GGREQUESTZ_TYPESENSE_API_KEY:?set GGREQUESTZ_TYPESENSE_API_KEY in .env}
AUTH_METHOD: ${GGREQUESTZ_AUTH_METHOD:-basic}
AUTHENTIK_CLIENT_ID: ${GGREQUESTZ_AUTHENTIK_CLIENT_ID:-}
AUTHENTIK_CLIENT_SECRET: ${GGREQUESTZ_AUTHENTIK_CLIENT_SECRET:-}
AUTHENTIK_ISSUER: ${GGREQUESTZ_AUTHENTIK_ISSUER:-}
SESSION_SECRET: ${GGREQUESTZ_SESSION_SECRET:?set GGREQUESTZ_SESSION_SECRET in .env}
IGDB_CLIENT_ID: ${IGDB_CLIENT_ID:?set IGDB_CLIENT_ID in .env}
IGDB_CLIENT_SECRET: ${IGDB_CLIENT_SECRET:?set IGDB_CLIENT_SECRET in .env}
ROMM_SERVER_URL: ${ROMM_SERVER_URL:-}
ROMM_USERNAME: ${ROMM_USERNAME:-}
ROMM_PASSWORD: ${ROMM_PASSWORD:-}
volumes:
- ${ROMM_AUTOMATION_DATA:-/opt/docker/romm-automation}/ggrequestz/app:/app/data
networks:
- romm-automation
ggrequestz-postgres:
image: postgres:16-alpine
container_name: ggrequestz-postgres
restart: unless-stopped
environment:
POSTGRES_DB: ${GGREQUESTZ_POSTGRES_DB:-ggrequestz}
POSTGRES_USER: ${GGREQUESTZ_POSTGRES_USER:-ggrequestz}
POSTGRES_PASSWORD: ${GGREQUESTZ_POSTGRES_PASSWORD:?set GGREQUESTZ_POSTGRES_PASSWORD in .env}
TZ: ${TZ:-America/Chicago}
volumes:
- ${ROMM_AUTOMATION_DATA:-/opt/docker/romm-automation}/ggrequestz/postgres:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${GGREQUESTZ_POSTGRES_USER:-ggrequestz} -d ${GGREQUESTZ_POSTGRES_DB:-ggrequestz}"]
interval: 30s
timeout: 5s
retries: 5
networks:
- romm-automation
ggrequestz-redis:
image: redis:7-alpine
container_name: ggrequestz-redis
restart: unless-stopped
command: ["redis-server", "--appendonly", "yes", "--requirepass", "${GGREQUESTZ_REDIS_PASSWORD:?set GGREQUESTZ_REDIS_PASSWORD in .env}"]
volumes:
- ${ROMM_AUTOMATION_DATA:-/opt/docker/romm-automation}/ggrequestz/redis:/data
healthcheck:
test: ["CMD", "redis-cli", "-a", "${GGREQUESTZ_REDIS_PASSWORD:?set GGREQUESTZ_REDIS_PASSWORD in .env}", "ping"]
interval: 30s
timeout: 5s
retries: 5
networks:
- romm-automation
ggrequestz-typesense:
image: typesense/typesense:27.1
container_name: ggrequestz-typesense
restart: unless-stopped
command: ["--data-dir", "/data", "--api-key", "${GGREQUESTZ_TYPESENSE_API_KEY:?set GGREQUESTZ_TYPESENSE_API_KEY in .env}", "--enable-cors"]
volumes:
- ${ROMM_AUTOMATION_DATA:-/opt/docker/romm-automation}/ggrequestz/typesense:/data
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8108/health"]
interval: 30s
timeout: 5s
retries: 5
networks:
- romm-automation
romarr:
image: ${ROMARR_IMAGE:-romarr/romarr:latest}
container_name: romarr
restart: unless-stopped
profiles: ["romarr"]
ports:
- "${ROMARR_PORT:-9797}:9797"
environment:
PUID: ${PUID:-1000}
PGID: ${PGID:-1000}
TZ: ${TZ:-America/Chicago}
volumes:
- ${ROMM_AUTOMATION_DATA:-/opt/docker/romm-automation}/romarr/config:/config
- ${ROMM_AUTOMATION_DATA:-/opt/docker/romm-automation}/staging/romarr-library:/roms
- ${ROMM_AUTOMATION_DATA:-/opt/docker/romm-automation}/staging/downloads:/downloads
networks:
- romm-automation
romm-comm:
image: idiosync000/romm-comm:latest
container_name: romm-comm
restart: unless-stopped
profiles: ["discord"]
environment:
TZ: ${TZ:-America/Chicago}
TOKEN: ${ROMMCOMM_DISCORD_TOKEN:?set ROMMCOMM_DISCORD_TOKEN in .env}
GUILD: ${ROMMCOMM_GUILD_ID:?set ROMMCOMM_GUILD_ID in .env}
API_URL: ${ROMM_SERVER_URL:?set ROMM_SERVER_URL in .env}
USER: ${ROMM_USERNAME:?set ROMM_USERNAME in .env}
PASS: ${ROMM_PASSWORD:?set ROMM_PASSWORD in .env}
ADMIN_ID: ${ROMMCOMM_ADMIN_ID:-}
DOMAIN: ${ROMMCOMM_DOMAIN:-}
REQUESTS_ENABLED: ${ROMMCOMM_REQUESTS_ENABLED:-true}
IGDB_CLIENT_ID: ${IGDB_CLIENT_ID:-}
IGDB_CLIENT_SECRET: ${IGDB_CLIENT_SECRET:-}
CHANNEL_ID: ${ROMMCOMM_CHANNEL_ID:-}
RECENT_ROMS_ENABLED: ${ROMMCOMM_RECENT_ROMS_ENABLED:-true}
RECENT_ROMS_CHANNEL_ID: ${ROMMCOMM_RECENT_ROMS_CHANNEL_ID:-}
GGREQUESTZ_ENABLED: ${ROMMCOMM_GGREQUESTZ_ENABLED:-true}
GGREQUESTZ_URL: http://ggrequestz:3000
GGREQUESTZ_API_KEY: ${GGREQUESTZ_API_KEY:-}
volumes:
- ${ROMM_AUTOMATION_DATA:-/opt/docker/romm-automation}/romm-comm/data:/app/data
networks:
- romm-automation
igir-worker:
image: node:22-alpine
container_name: igir-worker
restart: unless-stopped
profiles: ["validation"]
working_dir: /work
command: ["sh", "-c", "npm install -g igir@latest && sleep infinity"]
volumes:
- ${ROMM_AUTOMATION_DATA:-/opt/docker/romm-automation}/staging:/staging
- ${ROMM_AUTOMATION_DATA:-/opt/docker/romm-automation}/dat:/dat:ro
- ${ROMM_AUTOMATION_DATA:-/opt/docker/romm-automation}/reports:/reports
# Mount production RomM only after staging tests are verified.
# - ${ROMM_LIBRARY_PATH:?set ROMM_LIBRARY_PATH in .env}:/romm/library
networks:
- romm-automation
networks:
romm-automation:
name: romm-automation
driver: bridge