Files
app-catalog-felhom.eu/templates/gramps-web/docker-compose.yml
T
admin 18599037d3 R-806: gramps-web runs 2 gunicorn workers (held — not for main tonight)
The image's default 8 workers filled the 1024M limit; workers were
OOM-killed and :5000 mostly timed out. Measured on the bench both ways.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
2026-10-06 21:07:59 +02:00

80 lines
3.6 KiB
YAML

# Gramps Web - Családfa készítő és genealógiai szoftver
# Domain: ${SUBDOMAIN}.${DOMAIN}
# Database: None (file-based)
# RAM: ~340M with 2 web workers, measured 2026-10-06 (mem_limit: 1024M) | Pi-compatible: Yes
#
# Environment variables:
# DOMAIN - Your domain (e.g., demo-felhom.eu)
# GRAMPSWEB_SECRET_KEY- Titkosítási kulcs (auto-generated)
services:
gramps-web:
image: ghcr.io/gramps-project/grampsweb:v25.6.0
container_name: gramps-web
restart: unless-stopped
environment:
# decision 47: the app's own sign-up switch — open until the box closes it after the first admin (after_setup)
- GRAMPSWEB_REGISTRATION_DISABLED=${SIGNUP_CLOSED:-false}
- TZ=Europe/Budapest
- GRAMPSWEB_TREE=Family Tree
- GRAMPSWEB_SECRET_KEY=${GRAMPSWEB_SECRET_KEY}
# R-806 (measured 2026-10-06 on the bench): the image starts gunicorn with 8 workers unless GUNICORN_NUM_WORKERS is set.
# Eight workers filled the whole 1024M (anon at the limit), the kernel killed workers (oom_kill 3 in
# 9 min) and most requests to :5000 timed out after 15 s — why the persistence sweep got no answer.
# Two workers: the first answer in 10 s, every request in ~2 ms, anon 342 MB, 0 kills. A household
# tree has one or two people editing at once.
- GUNICORN_NUM_WORKERS=2
volumes:
# Storage layout — every path here is named by the image's OWN environment
# (docker image inspect ghcr.io/gramps-project/grampsweb:v25.6.0 → Config.Env), and the set
# matches upstream's reference compose
# (gramps-web-docs/examples/docker-compose-base/docker-compose.yml).
#
# What this template mounted before, measured 2026-08-02: only /app/data, /app/media and
# /tmp — and **/app/data is a path the application never writes**; it appears nowhere in the
# image's environment. So the FAMILY TREE (GRAMPS_DATABASE_PATH=/root/.gramps/grampsdb) and
# the ACCOUNTS DATABASE (GRAMPSWEB_USER_DB_URI=…/app/users/users.sqlite) both landed in the
# container's writable layer: destroyed by any redeploy, and absent from every backup, while
# gramps_data was tarred nightly as an empty directory.
- gramps_users:/app/users # GRAMPSWEB_USER_DB_URI — accounts
- gramps_db:/root/.gramps/grampsdb # GRAMPS_DATABASE_PATH — the family tree
- gramps_index:/app/indexdir # GRAMPSWEB_SEARCH_INDEX_DB_URI
- gramps_media:/app/media # GRAMPSWEB_MEDIA_BASE_DIR
- gramps_thumb_cache:/app/thumbnail_cache # GRAMPSWEB_THUMBNAIL_CACHE_CONFIG__CACHE_DIR
- gramps_cache:/app/cache # request/persistent caches, reports, exports
- gramps_secret:/app/secret # upstream reference compose
- gramps_tmp:/tmp
networks:
- traefik-public
deploy:
resources:
limits:
memory: 1024M
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://127.0.0.1:5000"]
interval: 30s
timeout: 5s
retries: 3
start_period: 30s
labels:
- "traefik.enable=true"
- "traefik.http.routers.gramps-web.rule=Host(`${SUBDOMAIN}.${DOMAIN}`)"
- "traefik.http.routers.gramps-web.entrypoints=websecure"
- "traefik.http.routers.gramps-web.tls=true"
- "traefik.http.routers.gramps-web.tls.certresolver=letsencrypt"
- "traefik.http.services.gramps-web.loadbalancer.server.port=5000"
volumes:
gramps_users:
gramps_db:
gramps_index:
gramps_media:
gramps_thumb_cache:
gramps_cache:
gramps_secret:
gramps_tmp:
networks:
traefik-public:
external: true