Files
app-catalog-felhom.eu/templates/securo/docker-compose.yml
T
adminandClaude Opus 5.5 b605815031
gates / gates (push) Successful in 26s
New app: Securo 0.18.0 (family finances), with its complete onboarding record — on the operator's yes
templates/securo/: the page (nginx), the backend (migrates before uvicorn — no one-shot job), a Celery
worker and beat, pgvector 0.8.7-pg16, redis 8.10.3-alpine; 1920M. Setup gate (has_users probe, measured
false -> true), sign-up off from the first byte, optional modules off, TRUSTED_PROXY_HOPS=3 measured
through the simulated tunnel. First ladder step 0.17.0 -> 0.18.0 by the writer (bench + 9202 proven; the
undo on a real failure proven on 9202). Fixture, data-key reason, copy freeze, README, FIRST-ADMIN.
Record: onboarding/securo.md. Evidence: felhom.eu documentation/audits/new-app-securo-2026-11-15/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012qRErfCoiTkvDK9N5XHbzb
2026-11-15 15:20:47 +01:00

253 lines
10 KiB
YAML

# Securo - Családi pénzügyek: számlák, költségvetés, megtakarítás
# Domain: ${SUBDOMAIN}.${DOMAIN}
# Database: PostgreSQL 16 + pgvector (the image upstream's own compose runs — `09` decision 42's rule) + Redis + Celery
# RAM: ~600M (mem_limit: 1920M total — web 128M + backend 384M + worker 512M + beat 256M + db 512M + redis 128M) | Pi-compatible: Yes (amd64, arm64)
#
# Environment variables:
# DOMAIN - Your domain (e.g., demo-felhom.eu)
# SECRET_KEY - Aláíró és titkosító kulcs (generált; a banki kapcsolatok adatait is ezzel titkosítja)
# DB_PASSWORD - Adatbázis jelszó (generált, hex: a DATABASE_URL-be kerül; csak a belső hálón)
# MCP_JWT_SECRET - Az AI-modul kulcsa (generált; a modul ki van kapcsolva, de az app beolvassa)
#
# Mirrors upstream's docker-compose.prod.yml at v0.18.0 (backend, celery worker, celery beat and the nginx frontend
# on securo-finance's images; pgvector pg16; redis 8), pinned. Differences, each on purpose:
# - NO one-shot `migrate` service: the backend runs `alembic upgrade head` before uvicorn, and the worker and beat wait
# for the backend's healthcheck, so nothing touches the schema before it is at head (upstream's own reason for the
# job). A failed migration keeps the backend unhealthy, and the box's update undo sees that.
# - The optional modules stay OFF: AI agents (no mcp-server), plugins, Brazilian bond prices (TESOURO_DIRETO_ENABLED,
# on by default upstream). Bank sync is OFF until the household sets up its OWN provider account (the box does not).
# - REGISTRATION_ENABLED=false from the first byte: the first admin is made on the app's own setup page (the box holds
# it behind the setup gate until then), family members are created by the admin. An admin may open sign-up in the
# app's Admin settings on purpose; that is the household's choice.
# - Redis is the Celery broker and the sign-in rate limiter only: no volume, no snapshot (`--save ""`).
# - The worker runs ONE task at a time (`--concurrency=1`, upstream 2): a household has one or two bank links, and it
# saves ~120 MB (measured on the operator's own instance, 2026-11-15).
services:
securo:
image: ghcr.io/securo-finance/securo-frontend:0.18.0
container_name: securo
restart: unless-stopped
environment:
TZ: Europe/Budapest
BACKEND_URL: http://securo-backend:8000
networks:
- traefik-public
- securo-internal
depends_on:
securo-backend:
condition: service_healthy
deploy:
resources:
limits:
memory: 128M
healthcheck:
# BusyBox wget (the nginx-unprivileged alpine image); the path goes through nginx to the backend, so a dead
# backend reads unhealthy here too.
test: ["CMD-SHELL", "wget -qO - http://127.0.0.1:8080/api/health | grep -q healthy"]
interval: 30s
timeout: 10s
retries: 5
start_period: 30s
labels:
- "traefik.enable=true"
- "traefik.http.routers.securo.rule=Host(`${SUBDOMAIN}.${DOMAIN}`)"
- "traefik.http.routers.securo.entrypoints=websecure"
- "traefik.http.routers.securo.tls=true"
- "traefik.http.routers.securo.tls.certresolver=letsencrypt"
- "traefik.http.services.securo.loadbalancer.server.port=8080"
securo-backend:
image: ghcr.io/securo-finance/securo-backend:0.18.0
container_name: securo-backend
restart: unless-stopped
command: ["sh", "-c", "alembic upgrade head && exec uvicorn app.main:app --host 0.0.0.0 --port 8000"]
environment:
TZ: Europe/Budapest
DATABASE_URL: postgresql+asyncpg://securo:${DB_PASSWORD}@securo-db:5432/securo
REDIS_URL: redis://securo-redis:6379/0
SECRET_KEY: ${SECRET_KEY}
DEBUG: "false"
FRONTEND_URL: https://${SUBDOMAIN}.${DOMAIN}
REGISTRATION_ENABLED: "false"
LOCAL_AUTH_ENABLED: "true"
DEFAULT_CURRENCY: HUF
STORAGE_LOCAL_PATH: /app/data/attachments
# The sign-in rate limit (5 tries a minute per address) keys on the Nth X-Forwarded-For entry from the right.
# 3 = the internet visitor Cloudflare appended: the chain reaching the backend is <visitor>, <cloudflared>,
# <traefik> (traefik appends cloudflared, nginx appends traefik). A forged left entry does not move the key; a LAN
# visitor's chain is shorter and keys on "unknown" (one bucket for the home network). Measured: onboarding 3.10.
TRUSTED_PROXY_HOPS: "3"
# PSD2: a bank may refuse more than four unattended reads a day (upstream docs/automatic-bank-sync.md).
BANK_SYNC_MIN_INTERVAL_HOURS: "6"
TESOURO_DIRETO_ENABLED: "false"
BRASILAPI_INSTITUTION_LOOKUP_ENABLED: "false"
SIMPLEFIN_ENABLED: "false"
FX_SYNC_MODE: on_demand
AGENTS_ENABLED: "false"
AGENTS_MCP_JWT_SECRET: ${MCP_JWT_SECRET}
volumes:
- securo_attachments:/app/data/attachments
networks:
- securo-internal
depends_on:
securo-db:
condition: service_healthy
securo-redis:
condition: service_healthy
deploy:
resources:
limits:
memory: 384M
healthcheck:
# The image has python and no wget/curl (inspected 2026-11-15, one tool per run) — upstream's own probe.
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/api/health', timeout=5)"]
interval: 30s
timeout: 10s
retries: 10
start_period: 120s
securo-worker:
image: ghcr.io/securo-finance/securo-backend:0.18.0
container_name: securo-worker
restart: unless-stopped
command: ["celery", "-A", "app.worker", "worker", "--loglevel=info", "--concurrency=1"]
environment:
TZ: Europe/Budapest
DATABASE_URL: postgresql+asyncpg://securo:${DB_PASSWORD}@securo-db:5432/securo
REDIS_URL: redis://securo-redis:6379/0
SECRET_KEY: ${SECRET_KEY}
DEBUG: "false"
FRONTEND_URL: https://${SUBDOMAIN}.${DOMAIN}
REGISTRATION_ENABLED: "false"
LOCAL_AUTH_ENABLED: "true"
DEFAULT_CURRENCY: HUF
STORAGE_LOCAL_PATH: /app/data/attachments
# The sign-in rate limit (5 tries a minute per address) keys on the Nth X-Forwarded-For entry from the right.
# 3 = the internet visitor Cloudflare appended: the chain reaching the backend is <visitor>, <cloudflared>,
# <traefik> (traefik appends cloudflared, nginx appends traefik). A forged left entry does not move the key; a LAN
# visitor's chain is shorter and keys on "unknown" (one bucket for the home network). Measured: onboarding 3.10.
TRUSTED_PROXY_HOPS: "3"
# PSD2: a bank may refuse more than four unattended reads a day (upstream docs/automatic-bank-sync.md).
BANK_SYNC_MIN_INTERVAL_HOURS: "6"
TESOURO_DIRETO_ENABLED: "false"
BRASILAPI_INSTITUTION_LOOKUP_ENABLED: "false"
SIMPLEFIN_ENABLED: "false"
FX_SYNC_MODE: on_demand
AGENTS_ENABLED: "false"
AGENTS_MCP_JWT_SECRET: ${MCP_JWT_SECRET}
volumes:
- securo_attachments:/app/data/attachments
networks:
- securo-internal
depends_on:
securo-backend:
condition: service_healthy
deploy:
resources:
limits:
memory: 512M
healthcheck:
# The worker serves no port: this shows only that celery is the container's main process.
test: ["CMD", "grep", "-q", "celery", "/proc/1/cmdline"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
securo-beat:
image: ghcr.io/securo-finance/securo-backend:0.18.0
container_name: securo-beat
restart: unless-stopped
# The schedule file lives in /tmp: it only remembers when each hourly job last ran, and is rebuilt at start.
command: ["celery", "-A", "app.worker", "beat", "--loglevel=info", "--schedule", "/tmp/celerybeat-schedule"]
environment:
TZ: Europe/Budapest
DATABASE_URL: postgresql+asyncpg://securo:${DB_PASSWORD}@securo-db:5432/securo
REDIS_URL: redis://securo-redis:6379/0
SECRET_KEY: ${SECRET_KEY}
DEBUG: "false"
FRONTEND_URL: https://${SUBDOMAIN}.${DOMAIN}
REGISTRATION_ENABLED: "false"
LOCAL_AUTH_ENABLED: "true"
DEFAULT_CURRENCY: HUF
STORAGE_LOCAL_PATH: /app/data/attachments
# The sign-in rate limit (5 tries a minute per address) keys on the Nth X-Forwarded-For entry from the right.
# 3 = the internet visitor Cloudflare appended: the chain reaching the backend is <visitor>, <cloudflared>,
# <traefik> (traefik appends cloudflared, nginx appends traefik). A forged left entry does not move the key; a LAN
# visitor's chain is shorter and keys on "unknown" (one bucket for the home network). Measured: onboarding 3.10.
TRUSTED_PROXY_HOPS: "3"
# PSD2: a bank may refuse more than four unattended reads a day (upstream docs/automatic-bank-sync.md).
BANK_SYNC_MIN_INTERVAL_HOURS: "6"
TESOURO_DIRETO_ENABLED: "false"
BRASILAPI_INSTITUTION_LOOKUP_ENABLED: "false"
SIMPLEFIN_ENABLED: "false"
FX_SYNC_MODE: on_demand
AGENTS_ENABLED: "false"
AGENTS_MCP_JWT_SECRET: ${MCP_JWT_SECRET}
networks:
- securo-internal
depends_on:
securo-backend:
condition: service_healthy
deploy:
resources:
limits:
memory: 256M
healthcheck:
test: ["CMD", "grep", "-q", "celery", "/proc/1/cmdline"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
securo-db:
image: pgvector/pgvector:0.8.7-pg16
container_name: securo-db
restart: unless-stopped
environment:
TZ: Europe/Budapest
POSTGRES_USER: securo
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: securo
volumes:
- securo_db_data:/var/lib/postgresql/data
networks:
- securo-internal
deploy:
resources:
limits:
memory: 512M
healthcheck:
test: ["CMD-SHELL", "pg_isready -U securo -d securo"]
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
securo-redis:
image: redis:8.10.3-alpine
container_name: securo-redis
restart: unless-stopped
command: ["redis-server", "--save", "", "--appendonly", "no"]
networks:
- securo-internal
deploy:
resources:
limits:
memory: 128M
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
volumes:
securo_db_data:
securo_attachments:
networks:
traefik-public:
external: true
securo-internal: