-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
83 lines (80 loc) · 2.09 KB
/
docker-compose.yml
File metadata and controls
83 lines (80 loc) · 2.09 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
services:
mqttbroker:
image: emqx/emqx:latest
ports:
- "11883:1883"
- "8083:8083"
- "8084:8084"
- "18083:18083"
container_name: oe-mqttbroker
volumes:
- ./emqx.conf:/opt/emqx/etc/emqx.conf:Z
healthcheck:
test: ["CMD", "emqx_ctl", "status"]
interval: 30s
timeout: 10s
retries: 5
cadvisor:
image: gcr.io/cadvisor/cadvisor:latest
ports:
- "18080:8080"
privileged: true
volumes:
- /:/rootfs:ro
- /var/run:/var/run:ro
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
- /dev/disk/:/dev/disk:ro
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/healthz"]
interval: 30s
timeout: 10s
retries: 5
container_name: oe-cadvisor
prometheus:
image: prom/prometheus:latest
ports:
- "19090:9090"
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro,Z
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9090/-/ready"]
interval: 30s
timeout: 10s
retries: 5
container_name: oe-prometheus
experiment:
container_name: ${EXPERIMENT_CONTAINER_NAME:-experiment}
depends_on:
- cadvisor
- prometheus
- mqttbroker
volumes:
- ./src:/workspace/src:Z
- ./main.py:/workspace/main.py:Z
- ./output:/workspace/output:Z
environment:
- PYTHONPATH=/workspace/src
build:
context: .
dockerfile: Dockerfile
command:
[
"--container-name", "${EXPERIMENT_CONTAINER_NAME:-experiment}",
"--workers", "${NUM_WORKERS}",
"--prometheus-host", "oe-prometheus",
"--prometheus-port", "9090",
"--prometheus-scrape-interval", "1",
"--mqtt-broker-host", "oe-mqttbroker",
"--mqtt-broker-port", "1883",
"--primes", "${PRIMES}",
"--iterations", "${ITERATIONS}",
"--scenario", "${SCENARIO}",
"--output-path", "/workspace/output/${OUTPUT_FILE_NAME}"
]
deploy:
resources:
limits:
memory: 1024M
reservations:
memory: 512M