Files
app-catalog-felhom.eu/templates/adventurelog/docker-compose.yml
T
admin c7de1e6364 adventurelog: fix lying frontend healthcheck (wget in a distroless image)
The frontend healthcheck ran 'wget --spider', but the image is distroless: no
shell, no wget, no curl, and node itself is only reachable at an absolute path
(/nodejs/bin/node, off PATH). The probe therefore ENOENT'd on every run, the
container stayed permanently unhealthy, and Traefik -- which will not route to
an unhealthy container -- returned 404 to the customer even though the app was
serving 200 on :3000 the whole time.

Replaced with the Node-exec family using the absolute interpreter path.
Live-verified on the demo box.

Campaign 7 catalog sweep.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nn3VgQk9iwEGgyx6QJ2NvE
2026-07-18 22:55:40 +02:00

109 lines
3.5 KiB
YAML

# AdventureLog - Utazási napló és kalandtervező
# Domain: ${SUBDOMAIN}.${DOMAIN}
# Database: postgres
# RAM: ~100M (mem_limit: 384M) | Pi-compatible: Yes
#
# Environment variables:
# DOMAIN - Your domain (e.g., demo-felhom.eu)
# SECRET_KEY - Titkosítási kulcs (auto-generated)
# DB_PASSWORD - Adatbázis jelszó (auto-generated)
services:
adventurelog:
image: ghcr.io/seanmorley15/adventurelog-backend:v0.12.1
container_name: adventurelog
restart: unless-stopped
depends_on:
adventurelog-postgres:
condition: service_healthy
environment:
- DJANGO_SECRET_KEY=${SECRET_KEY}
- SECRET_KEY=${SECRET_KEY}
- PGHOST=adventurelog-postgres
- PGDATABASE=adventurelog
- PGUSER=adventurelog
- PGPASSWORD=${DB_PASSWORD}
- PUBLIC_URL=https://${SUBDOMAIN}.${DOMAIN}
- CSRF_TRUSTED_ORIGINS=https://${SUBDOMAIN}.${DOMAIN}
- FRONTEND_URL=https://${SUBDOMAIN}.${DOMAIN}
volumes:
- adventurelog_media:/code/media
networks:
- traefik-public
- adventurelog-internal
deploy:
resources:
limits:
memory: 384M
healthcheck:
test: ["CMD-SHELL", "python -c 'import urllib.request; urllib.request.urlopen(\"http://127.0.0.1:8000/api/\")'"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
adventurelog-postgres:
image: postgis/postgis:16-3.5-alpine
container_name: adventurelog-postgres
restart: unless-stopped
environment:
- POSTGRES_USER=adventurelog
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=adventurelog
- TZ=Europe/Budapest
volumes:
- adventurelog_postgres_data:/var/lib/postgresql/data
networks:
- adventurelog-internal
deploy:
resources:
limits:
memory: 256M
healthcheck:
test: ["CMD-SHELL", "pg_isready -U adventurelog -d adventurelog"]
interval: 10s
timeout: 5s
retries: 5
start_period: 20s
adventurelog-frontend:
image: ghcr.io/seanmorley15/adventurelog-frontend:v0.12.1
container_name: adventurelog-frontend
restart: unless-stopped
environment:
- PUBLIC_SERVER_URL=http://adventurelog:8000
- BODY_SIZE_LIMIT=Infinity
- ORIGIN=https://${SUBDOMAIN}.${DOMAIN}
networks:
- traefik-public
- adventurelog-internal
labels:
- "traefik.enable=true"
- "traefik.http.routers.adventurelog.rule=Host(`${SUBDOMAIN}.${DOMAIN}`)"
- "traefik.http.routers.adventurelog.entrypoints=websecure"
- "traefik.http.routers.adventurelog.tls=true"
- "traefik.http.routers.adventurelog.tls.certresolver=letsencrypt"
- "traefik.http.services.adventurelog.loadbalancer.server.port=3000"
deploy:
resources:
limits:
memory: 256M
healthcheck:
# A frontend image distroless: nincs benne shell, wget vagy curl — a node
# bináris is csak abszolút úton érhető el (nem a PATH-on). A korábbi wget
# próba ezért soha nem futott le, a konténer véglegesen unhealthy lett, és
# a Traefik nem irányított rá forgalmat (404 az ügyfélnek).
test: ["CMD", "/nodejs/bin/node", "-e", "fetch('http://127.0.0.1:3000').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"]
interval: 10s
timeout: 5s
retries: 5
start_period: 20s
volumes:
adventurelog_media:
adventurelog_postgres_data:
networks:
traefik-public:
external: true
adventurelog-internal: