-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
108 lines (103 loc) · 2.62 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
108 lines (103 loc) · 2.62 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
services:
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
target: deps
# Override command to run the dev server instead of production server
command: sh -c "pnpm install --ignore-scripts --config.confirmModulesPurge=false && pnpm dev"
ports:
- "3000:3000"
environment:
- NODE_ENV=development
# Used by browser-side fetches from host machine
- NEXT_PUBLIC_BACKEND_URL=http://localhost:5000
# Used by Next.js rewrites running inside the frontend container
- BACKEND_INTERNAL_URL=http://backend:5000
- NODE_OPTIONS=--no-warnings=DeprecationWarning
- WATCHPACK_POLLING=true
- CHOKIDAR_USEPOLLING=true
env_file:
- ./frontend/.env
volumes:
- ./frontend:/app
- /app/node_modules
- /app/.next
depends_on:
backend:
condition: service_healthy
networks:
- angelfive-network
backend:
build:
context: ./backend
dockerfile: Dockerfile
target: builder
command: sh -c "pnpm install --ignore-scripts --config.confirmModulesPurge=false && pnpm dev"
ports:
- "5000:5000"
environment:
- NODE_ENV=development
- PORT=5000
- FRONTEND_URL=http://localhost:3000,http://frontend:3000
- ML_SERVICE_URL=http://ml-service:8000
- REDIS_URL=redis://redis:6379
- NODE_OPTIONS=--no-warnings=DeprecationWarning
env_file:
- ./backend/.env
volumes:
- ./backend:/app
- /app/node_modules
- ./tsconfig.base.json:/tsconfig.base.json
depends_on:
redis:
condition: service_healthy
healthcheck:
test:
[
"CMD",
"node",
"-e",
"fetch('http://127.0.0.1:5000/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))",
]
interval: 5s
timeout: 5s
retries: 30
start_period: 180s
networks:
- angelfive-network
ml-service:
build:
context: ./ml-service
dockerfile: Dockerfile
command: uvicorn app:app --host 0.0.0.0 --port 8000 --reload
ports:
- "8000:8000"
environment:
- PORT=8000
env_file:
- ./ml-service/.env
volumes:
- ./ml-service:/app
- ml_model_cache:/app/model_cache
networks:
- angelfive-network
redis:
image: redis:7-alpine
ports:
- "6379:6379"
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
networks:
- angelfive-network
networks:
angelfive-network:
driver: bridge
volumes:
redis_data:
ml_model_cache: