Files
Heimdall/docker/docker-compose.yml
T
Arnaud Dartois b217c932e8 feat(mvp): implement MVP multi-site platform
Complete MVP implementation (Étape 1) covering:
- Domain: primitives (Entity<TId>, ValueObject), 10 entities, 6 enums
- EF Core: AppDbContext + Identity, 8 EntityTypeConfigurations, audit/soft-delete interceptors, initial migration
- Application: service interfaces, DTOs, FluentValidation, ServiceResult pattern
- Security: Identity + JWT + API Key multi-auth, role-based permissions, constant-time key validation
- API: Auth/Sites/Agents controllers with explicit auth scheme policies
- Workers: Hangfire PostgreSQL setup with schema isolation, HeartbeatMonitorJob
- Agent: registration service + 30s heartbeat loop
- Docker: multi-stage Dockerfiles for central + agent, docker-compose.yml
- CI/CD: GitHub Actions pipeline with build+test and Docker build
- Tests: 13 domain tests (Site, Agent, Camera entities)

Architecture decisions per deliberation council:
- API Key via AuthenticationHandler<T> (not middleware)
- Explicit [Authorize(AuthenticationSchemes)] on all endpoints
- Event/Recording/Person/Vehicle deferred from initial migration
- Hangfire compatible with .NET 10 (v1.8.17)
2026-07-16 20:53:56 +00:00

63 lines
1.6 KiB
YAML

services:
postgresql:
image: postgres:17-alpine
environment:
POSTGRES_DB: heimdall
POSTGRES_USER: heimdall
POSTGRES_PASSWORD: heimdall
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U heimdall"]
interval: 10s
timeout: 5s
retries: 5
minio:
image: minio/minio:latest
command: server /data --console-address ":9001"
environment:
MINIO_ROOT_USER: heimdall
MINIO_ROOT_PASSWORD: heimdall123
ports:
- "9000:9000"
- "9001:9001"
volumes:
- minio_data:/data
heimdall-central:
build:
context: ..
dockerfile: docker/Dockerfile.central
environment:
DATABASE_URL: "Host=postgresql;Port=5432;Database=heimdall;Username=heimdall;Password=heimdall"
JWT__Key: "ThisIsADevelopmentKeyThatIsAtLeast32Bytes!"
JWT__Issuer: "heimdall"
JWT__Audience: "heimdall-api"
ASPNETCORE_ENVIRONMENT: Development
Cors__AllowedOrigins: "https://localhost:5001,http://localhost:5000"
ports:
- "5000:8080"
depends_on:
postgresql:
condition: service_healthy
restart: unless-stopped
heimdall-agent:
build:
context: ..
dockerfile: docker/Dockerfile.agent
environment:
HEIMDALL_CENTRAL_URL: "http://heimdall-central:8080"
HEIMDALL_SITE_TOKEN: "replace-with-actual-token"
HEIMDALL_AGENT_NAME: "agent-demo"
depends_on:
- heimdall-central
restart: unless-stopped
volumes:
pgdata:
minio_data: