-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
74 lines (69 loc) · 1.62 KB
/
Copy pathdocker-compose.yml
File metadata and controls
74 lines (69 loc) · 1.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
services:
mongodb:
image: mongo:7.0
container_name: amr_mongodb
restart: unless-stopped
ports:
- "27017:27017"
environment:
MONGO_INITDB_DATABASE: ${DB_NAME:-amr_db}
volumes:
- mongodb_data:/data/db
networks:
- amr_network
healthcheck:
test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"]
interval: 10s
timeout: 5s
retries: 5
server:
build:
context: ./server
dockerfile: Dockerfile
container_name: amr_server
restart: unless-stopped
ports:
- "8000:8000"
environment:
- MONGODB_URI=${MONGODB_URI:-mongodb://mongodb:27017/}
- DB_NAME=${DB_NAME:-amr_db}
- MODEL_PATH=${MODEL_PATH:-/app/models}
- SECRET_KEY=${SECRET_KEY:-your-secret-key-change-in-production}
volumes:
- ./server:/app
- model_data:/app/models
depends_on:
mongodb:
condition: service_healthy
networks:
- amr_network
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
interval: 30s
timeout: 10s
retries: 3
client:
build:
context: ./client
dockerfile: Dockerfile.dev
container_name: amr_client
restart: unless-stopped
ports:
- "5173:5173"
environment:
- VITE_API_URL=${VITE_API_URL:-http://localhost:8000}
volumes:
- ./client:/app
- /app/node_modules
depends_on:
- server
networks:
- amr_network
volumes:
mongodb_data:
driver: local
model_data:
driver: local
networks:
amr_network:
driver: bridge