-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
45 lines (42 loc) · 950 Bytes
/
docker-compose.yml
File metadata and controls
45 lines (42 loc) · 950 Bytes
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
version: "3.9"
services:
mongo:
image: mongo:7
ports:
- "27017:27017"
volumes:
- mongo_data:/data/db
restart: unless-stopped
healthcheck:
test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
api:
build: .
ports:
- "8000:8000"
volumes:
- ./uploads:/app/uploads
environment:
- APP_ENV=production
- UPLOAD_DIR=uploads
- IMAGE_MAX_WIDTH=1600
- MAX_UPLOAD_SIZE_MB=5
- OCR_LANG=en
- LOG_LEVEL=INFO
- MONGODB_URI=mongodb://mongo:27017
- MONGODB_DB_NAME=doc_verification
depends_on:
mongo:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
restart: unless-stopped
volumes:
mongo_data: