DeutschLernen/docker-compose.yml
Lasse Rune Hansen aa3db295ce fix(backend): Fix Mistral story generation with proper chat completion format
- Update MistralChatRequest to remove unused properties (User, Stop, FrequencyPenalty, PresencePenalty) causing 422 errors
- Add explicit JsonPropertyName attributes to ensure correct JSON serialization
- Update MistralService to send minimal requests matching Mistral API expectations
- Pass SegmentCount and CustomPrompt through StoryGenerationService to build proper prompts
- Add request logging in MistralConnector to debug API calls
- Update default model to mistral-small-latest
- Enhance error handling to log raw JSON responses

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-06-18 15:21:04 +02:00

71 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
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 Woodpecker secrets or environment)
Mistral__ApiKey: ${MISTRAL_APIKEY:-}
Mistral__BaseUrl: ${MISTRAL_BASEURL:-https://api.mistral.ai/v1/}
Mistral__DefaultModel: ${MISTRAL_DEFAULTMODEL:-mistral-small-latest}
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: