forked from khushboohpatel/gesturepro
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
67 lines (64 loc) · 1.56 KB
/
Copy pathdocker-compose.yml
File metadata and controls
67 lines (64 loc) · 1.56 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
services:
db:
image: postgres:16
restart: always
env_file:
- .env
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $POSTGRES_USER"]
interval: 5s
timeout: 5s
retries: 5
backend:
build:
context: .
dockerfile: ./server/Dockerfile
depends_on:
db:
condition: service_healthy
env_file:
- .env
environment:
DB_HOST: ${DB_HOST}
DB_PORT: ${DB_PORT}
DB_NAME: ${DB_NAME}
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
ML_MODELS_PATH: /server/ml/saved_models
YOLO_MODEL_PATH: /server/ml/saved_models/yolo/yolo_best.pt
CLASS_NAMES_PATH: /server/ml/saved_models/yolo/class_names.json
volumes:
- ./ml/saved_models:/server/ml/saved_models:ro
- ./server/app:/server/app:ro
ports:
- "8000:8000"
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
frontend:
build: ./client
ports:
- "3000:3000"
environment:
- NEXT_PUBLIC_API_URL=http://localhost:8000
- NODE_ENV=production
depends_on:
backend:
condition: service_healthy
restart: unless-stopped
command: sh -c "npm run dev"
working_dir: /app
volumes:
postgres_data: