veza/docker-compose.yml

107 lines
2.7 KiB
YAML
Raw Normal View History

services:
2025-12-13 02:34:34 +00:00
# PostgreSQL - Primary Database
# Limit: 256MB RAM. Sufficient for local dev schemas.
postgres:
2025-12-13 02:34:34 +00:00
image: postgres:16-alpine
container_name: veza_postgres
restart: unless-stopped
environment:
POSTGRES_USER: veza
2025-12-13 02:34:34 +00:00
POSTGRES_PASSWORD: password
POSTGRES_DB: veza
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
2025-12-13 02:34:34 +00:00
test: ["CMD-SHELL", "pg_isready -U veza"]
interval: 5s
timeout: 5s
retries: 5
2025-12-13 02:34:34 +00:00
deploy:
resources:
limits:
cpus: '0.50'
memory: 256M
reservations:
memory: 128M
2025-12-13 02:34:34 +00:00
# Redis - Cache & PubSub
# Limit: 64MB RAM.
redis:
image: redis:7-alpine
2025-12-13 02:34:34 +00:00
container_name: veza_redis
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- redis_data:/data
healthcheck:
2025-12-13 02:34:34 +00:00
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
2025-12-13 02:34:34 +00:00
deploy:
resources:
limits:
cpus: '0.25'
memory: 64M
reservations:
memory: 32M
2025-12-13 02:34:34 +00:00
# RabbitMQ - Message Broker
# Limit: 256MB RAM. Uses Erlang, can be memory hungry. Alpine helps.
rabbitmq:
2025-12-13 02:34:34 +00:00
image: rabbitmq:3-management-alpine
container_name: veza_rabbitmq
restart: unless-stopped
environment:
RABBITMQ_DEFAULT_USER: veza
2025-12-13 02:34:34 +00:00
RABBITMQ_DEFAULT_PASS: password
ports:
- "5672:5672" # AMQP
- "15672:15672" # Management UI
volumes:
- rabbitmq_data:/var/lib/rabbitmq
healthcheck:
2025-12-13 02:34:34 +00:00
test: rabbitmq-diagnostics -q ping
interval: 10s
timeout: 10s
2025-12-13 02:34:34 +00:00
retries: 5
deploy:
resources:
limits:
cpus: '0.50'
memory: 256M
reservations:
memory: 128M
2026-01-07 18:39:21 +00:00
# Backend API (si nécessaire pour développement local)
# Décommenter et configurer selon vos besoins
# backend-api:
# build:
# context: ./veza-backend-api
# container_name: veza_backend_dev
# environment:
# - APP_ENV=development
# - DATABASE_URL=postgresql://veza:password@postgres:5432/veza
# - REDIS_URL=redis://redis:6379
# - JWT_SECRET=dev-secret-key-minimum-32-characters-long
# - COOKIE_SECURE=false # false en dev local
# - COOKIE_SAME_SITE=lax # lax pour permettre localhost
# - COOKIE_DOMAIN=
# - COOKIE_HTTP_ONLY=true
# - COOKIE_PATH=/
# - CORS_ALLOWED_ORIGINS=http://localhost:3000,http://localhost:5173
# ports:
# - "8080:8080"
# depends_on:
# postgres:
# condition: service_healthy
# redis:
# condition: service_healthy
volumes:
postgres_data:
redis_data:
2025-12-13 02:34:34 +00:00
rabbitmq_data: