feat(infra): Docker Compose orchestration + env updates (Step 5)
- Replace monolith docker-compose with full microservices stack - Services: traefik, db, redis, migrate, auth, ws-gateway, chat, batch-agent, billing - Traefik API gateway with ForwardAuth, ACME/Cloudflare DNS-01 (from Step 2) - Centralized migrations via 'migrate' service (run-once) - All services share .env via env_file + override DATABASE_URL/REDIS_URL - Health checks on db and redis; service dependency ordering - MinIO and Qdrant kept as optional (commented out) - .env.example: add JWT_PRIVATE_KEY, CF_DNS_API_TOKEN, ACME_EMAIL, POSTGRES_ vars
This commit is contained in:
17
.env.example
17
.env.example
@@ -8,12 +8,14 @@ DATABASE_URL=postgresql+asyncpg://postgres:postgres@localhost:5432/adiuva
|
||||
REDIS_URL=redis://localhost:6379/0
|
||||
|
||||
# ── Auth (JWT RS256) ──────────────────────────────────────────────────────────
|
||||
# Public key for optional local JWT verification (Traefik ForwardAuth handles
|
||||
# this in production — services trust X-User-* headers from Traefik).
|
||||
# Generate keypair:
|
||||
# openssl genpkey -algorithm RSA -out private.pem -pkeyopt rsa_keygen_bits:2048
|
||||
# openssl rsa -in private.pem -pubout -out public.pem
|
||||
# Paste PEM content with literal \n for newlines.
|
||||
#
|
||||
# Private key — ONLY used by the Auth Service (JWT signing).
|
||||
JWT_PRIVATE_KEY=
|
||||
# Public key — used by all services / Traefik ForwardAuth (JWT verification).
|
||||
JWT_PUBLIC_KEY=
|
||||
JWT_ACCESS_TOKEN_EXPIRE_MINUTES=30
|
||||
JWT_REFRESH_TOKEN_EXPIRE_DAYS=30
|
||||
@@ -53,4 +55,13 @@ QDRANT_API_KEY=
|
||||
# ── Langfuse (observability) ─────────────────────────────────────────────────
|
||||
LANGFUSE_SECRET_KEY=sk-lf-...
|
||||
LANGFUSE_PUBLIC_KEY=pk-lf-...
|
||||
LANGFUSE_HOST=https://cloud.langfuse.com # or self-hosted URL
|
||||
LANGFUSE_HOST=https://cloud.langfuse.com # or self-hosted URL
|
||||
|
||||
# ── Cloudflare (Traefik ACME DNS-01 challenge) ───────────────────────────────
|
||||
CF_DNS_API_TOKEN=
|
||||
ACME_EMAIL=
|
||||
|
||||
# ── PostgreSQL (used by docker-compose) ──────────────────────────────────────
|
||||
POSTGRES_USER=postgres
|
||||
POSTGRES_PASSWORD=postgres
|
||||
POSTGRES_DB=adiuva
|
||||
Reference in New Issue
Block a user