Skip to content

Traefik Reverse Proxy

Deploy AdventureLog behind Traefik with automatic HTTPS and path-based routing using the official compose file.

Official compose file

Download docker/docker-compose.traefik.yaml from the repository. It includes:

  • Traefik v2.11 with Let's Encrypt
  • Prebuilt adventurelog-frontend and adventurelog-backend images (no local build required)
  • Path-based routing: frontend pages on /, backend on /media, /admin, /accounts, /static

Required environment variables

Add these to your .env alongside the standard AdventureLog variables:

VariableDescriptionExample
ACME_EMAILLet's Encrypt registration emailyou@example.com
TRAEFIK_DOMAINPublic domain for the routeradventurelog.example.com
SITE_URLPublic HTTPS URL (derives CSRF and frontend origins)https://adventurelog.example.com

See Environment Variables for the full list.

Getting started

bash
wget https://raw.githubusercontent.com/seanmorley15/AdventureLog/main/docker/docker-compose.traefik.yaml
wget https://raw.githubusercontent.com/seanmorley15/AdventureLog/main/.env.advanced.example
cp .env.advanced.example .env.advanced
# Edit .env: set SITE_URL, ACME_EMAIL, TRAEFIK_DOMAIN, POSTGRES_PASSWORD, SECRET_KEY
bash scripts/validate-env.sh
docker compose -f docker/docker-compose.traefik.yaml up -d

Routing overview

Traefik routes traffic to two containers on a single domain:

Path prefixService
/, /api, /auth, app pagesFrontend (SvelteKit)
/media, /admin, /accounts, /staticBackend (Django/Gunicorn)

This matches the internal routing model used by Standard Deployment, but with separate frontend and backend services.