-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
56 lines (52 loc) · 1.65 KB
/
docker-compose.yaml
File metadata and controls
56 lines (52 loc) · 1.65 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
version: '3.8'
# Services
services:
## InfluxDB - For sensor data
influxdb:
image: influxdb:latest
container_name: influxdb
restart: unless-stopped
ports:
- "8086:8086"
volumes:
- influxdb:/var/lib/influxdb
environment:
- DOCKER_INFLUXDB_INIT_MODE=setup
- DOCKER_INFLUXDB_INIT_USERNAME=${INFLUXDB_USER}
- DOCKER_INFLUXDB_INIT_PASSWORD=${INFLUXDB_PASSWORD}
- DOCKER_INFLUXDB_INIT_ORG=${INFLUXDB_ORG}
- DOCKER_INFLUXDB_INIT_BUCKET=${INFLUXDB_BUCKET}
- DOCKER_INFLUXDB_INIT_RETENTION=${INFLUXDB_RETENTION}
- DOCKER_INFLUXDB_INIT_DB=${INFLUXDB_DB}
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8086/ping" ]
interval: 30s
timeout: 10s
retries: 5
## Mosquitto - For MQTT broker
mosquitto:
build:
context: ./build/mosquitto
dockerfile: Dockerfile
args:
- MQTT_USER=${MQTT_USER}
- MQTT_PASSWORD=${MQTT_PASSWORD}
container_name: mosquitto
restart: unless-stopped
ports:
- "1883:1883"
healthcheck:
test: [ "CMD", "mosquitto_pub", "-h", "localhost", "-t", "test", "-m", "test", "-u", "${MQTT_USER}", "-P", "${MQTT_PASSWORD}" ]
interval: 30s
timeout: 10s
retries: 5
# MQTTX - For MQTT Web Client
mqtt-web-client:
image: emqx/mqttx-web
container_name: mqtt-web-client
restart: unless-stopped
ports:
- "81:80"
# Volumes
volumes:
influxdb: