-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
71 lines (65 loc) · 1.76 KB
/
docker-compose.yml
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
version: '3.8'
services:
mongodb:
image: mongo
container_name: mongodb
ports:
- 27017:27017
network_mode: "host"
influxdb:
image: influxdb
container_name: influxdb
ports:
- 8086:8086
network_mode: "host"
hwpc-sensor:
image: powerapi/hwpc-sensor:latest
container_name: hwpc-sensor
pid: host
network_mode: "host"
privileged: true
depends_on:
- mongodb
configs:
- source: sensor-config
target: /sensor-config.json
command: [ "--config-file", "/sensor-config.json" ]
volumes:
- /sys:/sys
- /var/lib/docker/containers:/var/lib/docker/containers:ro
- /tmp/powerapi-sensor-reporting:/reporting
smartwatts-formula:
build:
dockerfile: ./smartwatts-formula/.devcontainer/Dockerfile
container_name: smartwatts-formula
volumes:
- ./smartwatts-formula/:/workspaces/zero-carb/smartwatts-formula/:cached
network_mode: "host"
tty: true
depends_on:
- mongodb
- influxdb
configs:
- source: formula-config
target: /formula-config.json
command:
- bash
- -c
- |
pip install /workspaces/zero-carb/smartwatts-formula/smartwatts-formula/
pip install /workspaces/zero-carb/smartwatts-formula/openapi-client/
pip install "/workspaces/zero-carb/smartwatts-formula/powerapi[mongodb, influxdb, opentsdb, prometheus, influxdb_client]"
python -m smartwatts --config-file /formula-config.json
grafana:
image: grafana/grafana
container_name: grafana
ports:
- 3000:3000
network_mode: "host"
depends_on:
- influxdb
configs:
formula-config:
file: ./smartwatts-formula/config_file.json
sensor-config:
file: ./hwpc-sensor/config_file.json