DeutschLernen/docker-compose.yml
Lasse Rune Hansen 614682b422 chore(ci): add Woodpecker secrets for Mistral API and JWT configuration
- Update .woodpecker.yml to inject Mistral and JWT secrets as environment variables
- Update docker-compose.yml to pass secrets to backend container
- Secrets are loaded from Woodpecker and passed via environment variables:
  - MISTRAL_APIKEY, MISTRAL_BASEURL, MISTRAL_DEFAULTMODEL, etc.
  - JWT_KEY, JWT_ISSUER, JWT_AUDIENCE, JWT_EXPIREHOURS
- Production deployment will use Woodpecker secrets instead of appsettings files

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-06-10 17:24:03 +02:00

70 lines
2.3 KiB
YAML

services:
# PostgreSQL Database service
db:
image: postgres:15-alpine
container_name: deutschlernen-db
environment:
POSTGRES_DB: DeutschLernen
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d DeutschLernen"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
# Backend API
backend:
build:
context: ./GermanApp
dockerfile: Dockerfile
container_name: deutschlernen-backend
environment:
ASPNETCORE_ENVIRONMENT: Development
ASPNETCORE_URLS: http://+:8080
ConnectionStrings__DefaultConnection: Host=db;Port=5432;Database=DeutschLernen;Username=postgres;Password=postgres
# JWT Configuration (from Woodpecker secrets or environment)
Jwt__Key: ${JWT_KEY:-your-super-secret-key-at-least-32-characters-long}
Jwt__Issuer: ${JWT_ISSUER:-DeutschLernen}
Jwt__Audience: ${JWT_AUDIENCE:-DeutschLernen}
Jwt__ExpireHours: ${JWT_EXPIREHOURS:-24}
# Mistral API Configuration (from Woodpecker secrets or environment)
Mistral__ApiKey: ${MISTRAL_APIKEY:-}
Mistral__BaseUrl: ${MISTRAL_BASEURL:-https://api.mistral.ai/v1/}
Mistral__DefaultModel: ${MISTRAL_DEFAULTMODEL:-mistral-medium}
Mistral__TimeoutSeconds: ${MISTRAL_TIMEOUTSECONDS:-30}
Mistral__MaxRetries: ${MISTRAL_MAXRETRIES:-3}
Mistral__RateLimitPerMinute: ${MISTRAL_RATELIMITPERMINUTE:-10}
Mistral__EnableCaching: ${MISTRAL_ENABLECACHING:-true}
Mistral__CacheTTLMinutes: ${MISTRAL_CACHETTLMINUTES:-60}
Mistral__CircuitBreakerFailureThreshold: ${MISTRAL_CIRCUITBREAKERFAILURETHRESHOLD:-5}
Mistral__CircuitBreakerResetMinutes: ${MISTRAL_CIRCUITBREAKERRESETMINUTES:-1}
depends_on:
db:
condition: service_healthy
ports:
- "8080:8080"
restart: unless-stopped
# Frontend
frontend:
build:
context: ./german-app-frontend
dockerfile: Dockerfile
container_name: deutschlernen-frontend
environment:
NODE_ENV: production
depends_on:
backend:
condition: service_started
ports:
- "3000:3000"
restart: unless-stopped
volumes:
postgres_data: