Files
TimeTracker/docker-compose.example.yml
T
Dries Peeters 52c7e9f02a feat(ai): gate helper by default; add uninstall docs and release 5.5.6
- Honor AI_ENABLED across session AI, REST v1, LLM service, templates, and
  context; add regression tests for the AI helper gate.
- Docker Compose: optional Ollama behind the ai profile; align env.example
  and example compose with safe defaults.
- Add UNINSTALL.md with a dedicated AI teardown section; cross-link from
  README, INSTALLATION, Getting Started, docs index, and Docker setup guide.
- Record 5.5.6 in CHANGELOG and sync version examples in BUILD_CONFIGURATION;
  bump setup.py to 5.5.6.
2026-05-14 06:46:59 +02:00

94 lines
3.4 KiB
YAML

services:
app:
image: ghcr.io/drytrix/timetracker:latest
container_name: timetracker-app
environment:
- TZ=${TZ:-Europe/Brussels}
- CURRENCY=${CURRENCY:-EUR}
- ROUNDING_MINUTES=${ROUNDING_MINUTES:-1}
- SINGLE_ACTIVE_TIMER=${SINGLE_ACTIVE_TIMER:-true}
- ALLOW_SELF_REGISTER=${ALLOW_SELF_REGISTER:-true}
- IDLE_TIMEOUT_MINUTES=${IDLE_TIMEOUT_MINUTES:-30}
- ADMIN_USERNAMES=${ADMIN_USERNAMES:-admin}
# Security (required in production)
- SECRET_KEY=${SECRET_KEY}
# Version (inherited from image, but can be overridden)
- APP_VERSION=${APP_VERSION:-}
# Database (bundled Postgres)
- DATABASE_URL=postgresql+psycopg2://timetracker:timetracker@db:5432/timetracker
# CSRF & cookies (safe for HTTP local; tighten for HTTPS)
- WTF_CSRF_ENABLED=${WTF_CSRF_ENABLED:-true}
- WTF_CSRF_TIME_LIMIT=${WTF_CSRF_TIME_LIMIT:-3600}
- WTF_CSRF_SSL_STRICT=${WTF_CSRF_SSL_STRICT:-false}
- SESSION_COOKIE_SECURE=${SESSION_COOKIE_SECURE:-false}
- REMEMBER_COOKIE_SECURE=${REMEMBER_COOKIE_SECURE:-false}
- CSRF_COOKIE_SECURE=${CSRF_COOKIE_SECURE:-false}
- CSRF_COOKIE_HTTPONLY=${CSRF_COOKIE_HTTPONLY:-false}
- CSRF_COOKIE_SAMESITE=${CSRF_COOKIE_SAMESITE:-Lax}
- CSRF_COOKIE_NAME=${CSRF_COOKIE_NAME:-XSRF-TOKEN}
- SESSION_COOKIE_SAMESITE=${SESSION_COOKIE_SAMESITE:-Lax}
- PREFERRED_URL_SCHEME=${PREFERRED_URL_SCHEME:-http}
# Analytics (optional)
- SENTRY_DSN=${SENTRY_DSN:-}
- SENTRY_TRACES_RATE=${SENTRY_TRACES_RATE:-0.0}
- OTEL_EXPORTER_OTLP_ENDPOINT=${OTEL_EXPORTER_OTLP_ENDPOINT:-}
- OTEL_EXPORTER_OTLP_TOKEN=${OTEL_EXPORTER_OTLP_TOKEN:-}
- ENABLE_TRACING=${ENABLE_TRACING:-true}
- ENABLE_METRICS=${ENABLE_METRICS:-true}
- OTEL_METRICS_EXPORT_INTERVAL_MS=${OTEL_METRICS_EXPORT_INTERVAL_MS:-60000}
- OTEL_DEBUG_LOGGING=${OTEL_DEBUG_LOGGING:-false}
- ENABLE_TELEMETRY=${ENABLE_TELEMETRY:-false}
- TELE_SALT=${TELE_SALT:-}
# AI helper (off by default; no Ollama in this compose — use external provider or root docker-compose --profile ai)
- AI_ENABLED=${AI_ENABLED:-false}
- AI_PROVIDER=${AI_PROVIDER:-ollama}
- AI_BASE_URL=${AI_BASE_URL:-http://127.0.0.1:11434}
- AI_MODEL=${AI_MODEL:-llama3.1}
- AI_API_KEY=${AI_API_KEY:-}
- AI_TIMEOUT_SECONDS=${AI_TIMEOUT_SECONDS:-60}
- AI_CONTEXT_LIMIT=${AI_CONTEXT_LIMIT:-40}
ports:
- "8080:8080"
volumes:
- app_data:/data
- app_uploads:/app/app/static/uploads
- ./logs:/app/logs
depends_on:
db:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "-s", "-o", "/dev/null", "http://localhost:8080/_health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
db:
image: postgres:16-alpine
container_name: timetracker-db
environment:
- POSTGRES_DB=${POSTGRES_DB:-timetracker}
- POSTGRES_USER=${POSTGRES_USER:-timetracker}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-timetracker}
- TZ=${TZ:-Europe/Brussels}
volumes:
- db_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
restart: unless-stopped
volumes:
app_data:
driver: local
app_uploads:
driver: local
db_data:
driver: local