DeutschLernen/docker-compose.yml
Lasse Rune Hansen 8eeef011ce fix(infra): remove obsolete version field from docker-compose.yml
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-06-05 11:53:45 +02:00

66 lines
1.6 KiB
YAML

services:
# PostgreSQL Database
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
depends_on:
db:
condition: service_healthy
ports:
- "8080:8080"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
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_healthy
ports:
- "3000:3000"
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
restart: unless-stopped
volumes:
postgres_data: