DeutschLernen/docker-compose.yml
Lasse Rune Hansen 987c005305 fix(backend/docker): add Mistral API key from appsettings.Development.json
Updated docker-compose.yml to use hardcoded Mistral API key from development
configuration instead of relying on environment variable.

This fixes the 500 error (which was masking a 401 from Mistral due to missing API key).

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

71 lines
2.1 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
SeedDatabase: "true"
# 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 appsettings.Development.json)
Mistral__ApiKey: Odq70O3NUQ1H8hMhGJAFAz5OJfukX6lT
Mistral__BaseUrl: https://api.mistral.ai/v1/
Mistral__DefaultModel: mistral-medium
Mistral__TimeoutSeconds: 30
Mistral__MaxRetries: 3
Mistral__RateLimitPerMinute: 10
Mistral__EnableCaching: true
Mistral__CacheTTLMinutes: 60
Mistral__CircuitBreakerFailureThreshold: 5
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: