-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
74 lines (68 loc) · 1.85 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
74 lines (68 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
version: '3.9'
# Environnement de développement local Vision V2
# Usage : docker-compose -f docker-compose.dev.yml up -d
# Migration NAS : remplacer les volumes par des bind mounts vers le NAS
services:
# PostgreSQL local (remplace AWS RDS)
postgres:
image: postgres:15-alpine
container_name: vision-v2-db
environment:
POSTGRES_USER: projectadmin
POSTGRES_PASSWORD: vision_dev_local
POSTGRES_DB: postgres
ports:
- "5432:5432"
volumes:
- vision_pg_data:/var/lib/postgresql/data
- ./backend/database/init_local_db.sql:/docker-entrypoint-initdb.d/01_init.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U projectadmin -d postgres"]
interval: 10s
timeout: 5s
retries: 5
# FastAPI backend
backend:
build:
context: .
dockerfile: backend/Dockerfile
container_name: vision-v2-backend
ports:
- "8000:8000"
environment:
RDS_HOST: postgres
RDS_USER: projectadmin
RDS_PASSWORD: vision_dev_local
RDS_DB: postgres
RDS_PORT: "5432"
depends_on:
postgres:
condition: service_healthy
volumes:
- ./src:/app/src:ro
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
# pgAdmin (optionnel — UI pour explorer la DB)
pgadmin:
image: dpage/pgadmin4:latest
container_name: vision-v2-pgadmin
environment:
PGADMIN_DEFAULT_EMAIL: admin@vision.local
PGADMIN_DEFAULT_PASSWORD: admin
ports:
- "5050:80"
depends_on:
- postgres
profiles:
- debug # Activer avec : docker-compose --profile debug up
volumes:
vision_pg_data:
driver: local
# Pour migration NAS : remplacer par :
# driver_opts:
# type: nfs
# o: addr=<NAS_IP>,rw
# device: ":/volume1/vision-v2"