Docker: complete .env.example, image-based and Traefik compose examples, health checks

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-07 16:49:37 -05:00
1 parent 1412470cd5
commit a6e5c4343f
5 files changed
+131 -9

No files matched your search

+44
View File
@@ -0,0 +1,44 @@
# Behind Traefik with HTTPS, optionally with Authentik forward auth in front.
# Assumes Traefik already runs with an entrypoint "websecure", a certificate
# resolver "letsencrypt", and a Docker network "proxy" shared with it. Adjust
# the names to your Traefik setup. In .env: APP_HOST=aircraft.example.com, FORCE_SSL=true.
#
# docker compose -f docker-compose.traefik.yml up -d
#
# Authentik: create the proxy provider and the unauthenticated URL list as in
# docs/authentik.md, then uncomment the middleware lines below. Leave them out
# to rely on the app's own sign-in (and optionally its single sign-on).
services:
web:
image: your-registry/simple-aircraft-manager-rails:latest # or: build: .
restart: unless-stopped
env_file: .env
environment:
SOLID_QUEUE_IN_PUMA: "true"
volumes:
- sam_storage:/rails/storage
networks:
- proxy
healthcheck:
test: ["CMD", "curl", "-fsS", "http://localhost/up"]
interval: 30s
timeout: 5s
retries: 3
labels:
- traefik.enable=true
- traefik.docker.network=proxy
- traefik.http.routers.aircraft.rule=Host(`aircraft.example.com`)
- traefik.http.routers.aircraft.entrypoints=websecure
- traefik.http.routers.aircraft.tls.certresolver=letsencrypt
- traefik.http.services.aircraft.loadbalancer.server.port=80
# --- Authentik forward auth (optional) ---
# - traefik.http.routers.aircraft.middlewares=authentik@docker
# The middleware itself is usually defined once, on the Authentik container:
# - traefik.http.middlewares.authentik.forwardauth.address=http://authentik-server:9000/outpost.goauthentik.io/auth/traefik
# - traefik.http.middlewares.authentik.forwardauth.trustForwardHeader=true
# - traefik.http.middlewares.authentik.forwardauth.authResponseHeaders=X-authentik-username,X-authentik-groups,X-authentik-email,X-authentik-name,X-authentik-uid
volumes:
sam_storage:
networks:
proxy:
external: true