-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
53 lines (52 loc) · 1.2 KB
/
Copy pathdocker-compose.yml
File metadata and controls
53 lines (52 loc) · 1.2 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
services:
api:
build:
context: .
target: dev
image: sentinel:dev
container_name: sentinel-api
ports:
- "8000:8000"
volumes:
- ./src:/app/src
- ./models:/app/models
- ./.env:/app/.env:ro
environment:
- MODEL_NAME=yolo11m.pt
- DEVICE=cpu
- API_HOST=0.0.0.0
- API_PORT=8000
- LOG_LEVEL=INFO
restart: unless-stopped
healthcheck:
test: ["CMD", "python", "-c", "import requests; requests.get('http://localhost:8000/api/health')"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
api-prod:
build:
context: .
target: base
image: sentinel:latest
container_name: sentinel-api-prod
ports:
- "8000:8000"
volumes:
- ./models:/app/models:ro
- ./.env:/app/.env:ro
environment:
- MODEL_NAME=yolo11m.pt
- DEVICE=cpu
- API_HOST=0.0.0.0
- API_PORT=8000
- LOG_LEVEL=INFO
restart: always
healthcheck:
test: ["CMD", "python", "-c", "import requests; requests.get('http://localhost:8000/api/health')"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
profiles:
- production