Upgrade configuration and Docker stack to v2.0.0
This commit is contained in:
@@ -1,41 +1,40 @@
|
||||
services:
|
||||
# Portail admin (ce projet)
|
||||
admin:
|
||||
build:
|
||||
context: .
|
||||
args:
|
||||
VITE_API_BASE_URL: http://backend:8000
|
||||
VITE_API_BASE_URL: http://localhost:8000
|
||||
ports:
|
||||
- "3000:3000"
|
||||
- '3000:3000'
|
||||
depends_on:
|
||||
- backend
|
||||
restart: unless-stopped
|
||||
|
||||
# Backend Imago Hub (projet séparé)
|
||||
backend:
|
||||
build:
|
||||
context: ..
|
||||
ports:
|
||||
- "8000:8000"
|
||||
- '8000:8000'
|
||||
volumes:
|
||||
- ../data:/app/data
|
||||
env_file: ../.env
|
||||
environment:
|
||||
- DATABASE_URL=postgresql+asyncpg://imago:imago@db:5432/imago
|
||||
- REDIS_URL=redis://redis:6379/0
|
||||
- STORAGE_BACKEND=s3
|
||||
- S3_BUCKET=imago
|
||||
- S3_ENDPOINT_URL=http://minio:9000
|
||||
- S3_ENDPOINT_PUBLIC=http://localhost:9000
|
||||
- S3_ACCESS_KEY=minioadmin
|
||||
- S3_SECRET_KEY=***
|
||||
- S3_REGION=us-east-1
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
# Worker ARQ
|
||||
worker:
|
||||
build:
|
||||
context: ..
|
||||
@@ -46,6 +45,13 @@ services:
|
||||
environment:
|
||||
- DATABASE_URL=postgresql+asyncpg://imago:imago@db:5432/imago
|
||||
- REDIS_URL=redis://redis:6379/0
|
||||
- STORAGE_BACKEND=s3
|
||||
- S3_BUCKET=imago
|
||||
- S3_ENDPOINT_URL=http://minio:9000
|
||||
- S3_ENDPOINT_PUBLIC=http://localhost:9000
|
||||
- S3_ACCESS_KEY=minioadmin
|
||||
- S3_SECRET_KEY=***
|
||||
- S3_REGION=us-east-1
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
@@ -53,7 +59,6 @@ services:
|
||||
condition: service_healthy
|
||||
restart: unless-stopped
|
||||
|
||||
# PostgreSQL
|
||||
db:
|
||||
image: postgres:16-alpine
|
||||
environment:
|
||||
@@ -63,37 +68,35 @@ services:
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U imago -d imago"]
|
||||
test: ['CMD-SHELL', 'pg_isready -U imago -d imago']
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
restart: unless-stopped
|
||||
|
||||
# Redis (file ARQ + Pub/Sub)
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
ports:
|
||||
- "6379:6379"
|
||||
- '6379:6379'
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
command: redis-server --appendonly yes
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
test: ['CMD', 'redis-cli', 'ping']
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
|
||||
# MinIO (stockage S3 compatible — développement)
|
||||
minio:
|
||||
image: minio/minio
|
||||
ports:
|
||||
- "9000:9000"
|
||||
- "9001:9001"
|
||||
- '9000:9000'
|
||||
- '9001:9001'
|
||||
environment:
|
||||
MINIO_ROOT_USER: minioadmin
|
||||
MINIO_ROOT_PASSWORD: minioadmin
|
||||
command: server /data --console-address ":9001"
|
||||
command: server /data --console-address ':9001'
|
||||
volumes:
|
||||
- minio_data:/data
|
||||
restart: unless-stopped
|
||||
|
||||
Reference in New Issue
Block a user