-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
56 lines (54 loc) · 1.35 KB
/
docker-compose.yml
File metadata and controls
56 lines (54 loc) · 1.35 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
services:
pyro-camera-api:
build:
context: ./pyro_camera_api
image: pyronear/pyro-camera-api:${PYRO_ENGINE_VERSION:-latest}
container_name: pyro-camera-api
environment:
CAM_USER: ${CAM_USER}
CAM_PWD: ${CAM_PWD}
MEDIAMTX_SERVER_IP: ${MEDIAMTX_SERVER_IP}
volumes:
- ./data:/usr/src/app/data
restart: always
network_mode: host
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:8081/health || exit 1"]
interval: 30s
retries: 3
start_period: 20s
timeout: 5s
logging:
driver: json-file
options:
max-size: "100m"
max-file: "5"
engine:
build:
context: ./engine
image: pyronear/pyro-engine:${PYRO_ENGINE_VERSION:-latest}
container_name: engine
environment:
API_URL: ${API_URL}
CAM_USER: ${CAM_USER}
CAM_PWD: ${CAM_PWD}
volumes:
- ./data:/usr/src/app/data
command: >
sh -c '
truncate -s 0 engine.log &&
python run.py 2>&1 | tee -a engine.log
'
restart: always
network_mode: host
healthcheck:
test: ["CMD-SHELL", "grep -q 'confidence\\|Nighttime detected' engine.log || exit 1"]
interval: 30s
retries: 3
start_period: 20s
timeout: 5s
logging:
driver: json-file
options:
max-size: "100m"
max-file: "5"