9041b24384
- Corrige le seed pour vérifier l'existence des tables avant insertion
(évite l'échec au démarrage si les migrations n'ont pas encore été appliquées)
- Ajuste le port frontend de 3000 à 3001 (port 3000 occupé sur l'hôte)
- Migrations Alembic : schémas notes, shopping, todos créés avec succès
- Seed : 114 produits et 9 magasins chargés
- Endpoint /api/health : {"status":"ok"}
- Tests : 6/6 passent (health + media)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
40 lines
800 B
YAML
40 lines
800 B
YAML
services:
|
|
db:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
POSTGRES_USER: homehub
|
|
POSTGRES_PASSWORD: homehub
|
|
POSTGRES_DB: homehub
|
|
volumes:
|
|
- db_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U homehub"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
backend:
|
|
build: ./backend
|
|
environment:
|
|
DATABASE_URL: postgresql+asyncpg://homehub:homehub@db:5432/homehub
|
|
UPLOAD_DIR: /uploads
|
|
CORS_ORIGINS: http://localhost:3000,http://frontend:3000
|
|
volumes:
|
|
- uploads:/uploads
|
|
ports:
|
|
- "8000:8000"
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
|
|
frontend:
|
|
build: ./frontend
|
|
ports:
|
|
- "3001:80"
|
|
depends_on:
|
|
- backend
|
|
|
|
volumes:
|
|
db_data:
|
|
uploads:
|