Files
app-catalog-felhom.eu/templates/opengist/docker-compose.yml
T

49 lines
1.8 KiB
YAML

# OpenGist - Kód snippetek megosztása (GitHub Gist alternatíva)
# Domain: ${SUBDOMAIN}.${DOMAIN}
# Database: None (file-based)
# RAM: ~30M steady, ~220M at a sign-up/sign-in (mem_limit: 256M) | Pi-compatible: Yes
#
# Environment variables:
# DOMAIN - Your domain (e.g., demo-felhom.eu)
services:
opengist:
image: ghcr.io/thomiceli/opengist:1.15
container_name: opengist
restart: unless-stopped
environment:
- TZ=Europe/Budapest
- OG_EXTERNAL_URL=https://${SUBDOMAIN}.${DOMAIN}
volumes:
- opengist_data:/opengist
networks:
- traefik-public
deploy:
resources:
limits:
memory: 256M # catalog sweep 2026-10-24: at 128M one sign-up + sign-in hit the limit 443 times and swapped 98 MiB; at 256M anon 216 MiB
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://127.0.0.1:6157/healthcheck"]
interval: 30s
timeout: 5s
retries: 3
start_period: 30s
labels:
- "traefik.enable=true"
- "traefik.http.routers.opengist.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.opengist-xff.headers.customrequestheaders.X-Forwarded-For="
- "traefik.http.routers.opengist.middlewares=opengist-xff"
- "traefik.http.routers.opengist.entrypoints=websecure"
- "traefik.http.routers.opengist.tls=true"
- "traefik.http.routers.opengist.tls.certresolver=letsencrypt"
- "traefik.http.services.opengist.loadbalancer.server.port=6157"
volumes:
opengist_data:
networks:
traefik-public:
external: true