Skip to content
This repository was archived by the owner on Mar 22, 2025. It is now read-only.

Commit 0e3dada

Browse files
committed
Adds collector and influxdb to docker-compose
1 parent b3ee023 commit 0e3dada

File tree

2 files changed

+30
-20
lines changed

2 files changed

+30
-20
lines changed

collector/system.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func newSystem() (sys *system) {
5252
sys.Husk = &components.Husk{
5353
Description: "pulls data from other Arrorhead systems and sends it to a InfluxDB server.",
5454
Details: map[string][]string{"Developer": {"Alex"}},
55-
ProtoPort: map[string]int{"https": 8691, "http": 8690, "coap": 0},
55+
ProtoPort: map[string]int{"https": 6666, "http": 6666, "coap": 0},
5656
InfoLink: "https://github.com/lmas/d0020e_code/tree/master/collector",
5757
}
5858
return

docker-compose.yml

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -83,23 +83,33 @@ services:
8383
volumes:
8484
- ./data/zigbee:/data
8585

86-
# influxdb:
87-
# image: influxdb:x.x.x-alpine
88-
# ports:
89-
# volumes:
90-
# - ./data/influxdb:xxx
91-
#
92-
## TODO: yeah gonna need a better name here
93-
# influx:
94-
# build: ./src/influxdb/
95-
# image: influx:0.2.0
96-
# depends_on:
97-
# - ds18b20
98-
# - influxdb
99-
# - zigbee
100-
# - comfortstat
101-
# ports:
102-
# - 8870:8870
103-
# volumes:
104-
# - ./data/influxdb:/data
86+
influxdb:
87+
image: influxdb:2.7.11-alpine
88+
environment:
89+
DOCKER_INFLUXDB_INIT_MODE: setup
90+
DOCKER_INFLUXDB_INIT_USERNAME: admin
91+
DOCKER_INFLUXDB_INIT_PASSWORD: password
92+
DOCKER_INFLUXDB_INIT_ORG: organisation
93+
DOCKER_INFLUXDB_INIT_BUCKET: bucket
94+
ports:
95+
- 8086:8086
96+
volumes:
97+
- ./data/influxdb/data:/var/lib/influxdb2
98+
- ./data/influxdb/config:/etc/influxdb2
99+
100+
collector:
101+
image: collector:0.1.0
102+
build:
103+
context: ./src
104+
args:
105+
- SRC=./collector/*.go
106+
- PORT=6666
107+
depends_on:
108+
- ds18b20
109+
- comfortstat
110+
- zigbee
111+
- influxdb
112+
network_mode: "host"
113+
volumes:
114+
- ./data/collector:/data
105115

0 commit comments

Comments
 (0)