3.0 KiB
3.0 KiB
Docker Compose Fix Summary - Meldestelle Project
Issues Identified and Fixed
Problem Description
The user reported that docker-compose.services.yml and docker-compose.clients.yml were not working properly, while docker-compose.yml worked except for a Keycloak issue.
Root Causes Identified
- Standalone Execution Issue: The services and clients compose files were designed to work in combination with the main infrastructure file, not as standalone files
- Keycloak Port Mismatch: Auth-server in clients.yml was trying to connect to
keycloak:8081but Keycloak runs on port8080 - Network Configuration Error: clients.yml had
external: falseinstead ofexternal: truefor the shared network
Fixes Applied
1. Fixed Keycloak Port Reference
File: docker-compose.clients.yml
Line: 102
Change:
BEFORE: KEYCLOAK_SERVER_URL: http://keycloak:8081
AFTER: KEYCLOAK_SERVER_URL: http://keycloak:8080
2. Fixed Network Configuration
File: docker-compose.clients.yml
Line: 177
Change:
BEFORE: external: false
AFTER: external: true
Correct Usage Instructions
1. Infrastructure Only (Base Services)
docker compose -f docker-compose.yml up -d
This starts: PostgreSQL, Redis, Keycloak, Consul, Kafka, Prometheus, Grafana, API Gateway
2. Infrastructure + Application Services
docker compose -f docker-compose.yml -f docker-compose.services.yml up -d
This adds: Ping Service (and other services when uncommented)
3. Full Stack (Infrastructure + Services + Clients)
docker compose -f docker-compose.yml -f docker-compose.services.yml -f docker-compose.clients.yml up -d
This adds: Web App, Desktop App, Auth Server, Monitoring Server
4. Infrastructure + Clients Only (Frontend Development)
docker compose -f docker-compose.yml -f docker-compose.clients.yml up -d
This is useful for frontend development without backend services.
Important Notes
- Do not run services.yml or clients.yml standalone - they depend on infrastructure services from the main compose file
- Always start with docker-compose.yml first - it creates the shared network and infrastructure services
- Use the newer
docker composecommand instead ofdocker-composeif you encounter Python module errors - Service Dependencies:
- Services depend on: consul, postgres, redis (from main compose)
- Clients depend on: api-gateway, keycloak, postgres (from main compose)
Test Results
All combinations now pass configuration validation:
- ✅
docker-compose.yml- Works standalone - ✅
docker-compose.yml+docker-compose.services.yml- Works combined - ✅
docker-compose.yml+docker-compose.clients.yml- Works combined - ✅ All three files combined - Works as full stack
Status: RESOLVED ✅
The docker-compose configuration issues have been fixed. All files can now be started successfully using the correct command combinations shown above.