-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
106 lines (98 loc) · 2.5 KB
/
docker-compose.yml
File metadata and controls
106 lines (98 loc) · 2.5 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# This Docker Compose file sets up:
# - InfluxDB 3 (time-series database)
# - InfluxDB UI (web interface)
# - Grafana (dashboard/visualization)
# - Mosquitto (MQTT broker)
# - MQTT → InfluxDB bridge (custom service)
#
# Start with: docker compose up -d
# Then access:
# - InfluxDB UI: http://localhost:8888
# - Grafana: http://localhost:3000
services:
influxdb3-core:
image: influxdb:3-core
container_name: influxdb3-core
ports:
- "8181:8181" # default InfluxDB 3 HTTP API port
volumes:
- influxdb3_data:/var/lib/influxdb3
command: influxdb3 serve --node-id mynode --object-store file --data-dir /var/lib/influxdb3
restart: unless-stopped
networks:
- daq-net
influxdb3-ui:
image: influxdata/influxdb3-ui:1.8.0
container_name: influxdb3-ui
ports:
- "8080:8080" # Access via http://localhost:8888
environment:
INFLUXDB_URL: http://influxdb3-core:8181
INFLUXDB_TOKEN: ${INFLUXDB_TOKEN} # Make sure you export this env var before 'docker-compose up'
restart: unless-stopped
networks:
- daq-net
grafana:
image: grafana/grafana-oss:latest
container_name: grafana
ports:
- "3000:3000"
volumes:
- grafana-storage:/var/lib/grafana
environment:
GF_SECURITY_ADMIN_USER: admin
GF_SECURITY_ADMIN_PASSWORD: admin
depends_on:
- influxdb3-core
restart: unless-stopped
networks:
- daq-net
mosquitto:
image: eclipse-mosquitto:latest
container_name: mosquitto
ports:
- "1883:1883" # MQTT
- "9001:9001" # WebSocket (optional)
volumes:
- mosquitto_data:/mosquitto/data
- mosquitto_log:/mosquitto/log
restart: unless-stopped
networks:
- daq-net
#mqtt-influx-bridge: # custom service
# build: ./mqtt_bridge
# container_name: mqtt-influx-bridge
# depends_on:
# - mosquitto
# - influxdb3-core
# environment:
# INFLUX_URL: http://influxdb3-core:8181
# INFLUX_TOKEN: ${INFLUXDB_TOKEN}
# INFLUX_DATABASE: daqDB
# MQTT_HOST: mosquitto
# MQTT_PORT: 1883
# restart: unless-stopped
# networks:
# - daq-net
server:
build: .
container_name: daq-server
env_file:
- .env
ports:
- 8000:8000
depends_on:
- mosquitto
- influxdb3-core
volumes:
- ./labjack_channels.json:/app/labjack_channels.json
networks:
- daq-net
volumes:
influxdb3_data:
grafana-storage:
mosquitto_data:
mosquitto_log:
networks:
daq-net:
driver: bridge