176 lines
4.6 KiB
YAML
176 lines
4.6 KiB
YAML
version: '3'
|
|
|
|
services:
|
|
|
|
zigbee2mqtt:
|
|
container_name: zigbee2mqtt
|
|
networks:
|
|
- frontend
|
|
- backend
|
|
image: koenkk/zigbee2mqtt:1.6.0
|
|
volumes:
|
|
- ${DIR}/zigbee2matt:/app/data
|
|
devices:
|
|
- /dev/ttyACM0:/dev/ttyACM0
|
|
restart: always
|
|
environment:
|
|
- TZ=Europe/Stockholm
|
|
|
|
grafana:
|
|
image: grafana/grafana:6.4.2
|
|
container_name: grafana
|
|
networks:
|
|
- backend
|
|
volumes:
|
|
# Data persistency
|
|
# sudo mkdir -p /srv/docker/grafana/data; chown 472:472 /srv/docker/grafana/data
|
|
- "${DIR}/grafana:/var/lib/grafana"
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.grafana.rule=Host(`grafana.localhost`)"
|
|
- "traefik.http.routers.grafana.entrypoints=web"
|
|
- "traefik.http.services.grafana-service.loadbalancer.server.port=3000"
|
|
|
|
influx:
|
|
image: influxdb:1.7
|
|
container_name: influxdb
|
|
networks:
|
|
- backend
|
|
labels:
|
|
- "traefik.http.routers.influx.entryPoints=port8086"
|
|
- "traefik.http.routers.influx.rule=host(`influx.localhost`)"
|
|
- "traefik.http.services.influx-service.loadBalancer.server.port=8086"
|
|
restart: always
|
|
volumes:
|
|
- ${DIR}/influx-data:/var/lib/influxdb
|
|
environment:
|
|
- INFLUXDB_DB=SOME_DB_NAME # set any other to create database on initialization
|
|
- INFLUXDB_HTTP_ENABLED=true
|
|
- INFLUXDB_HTTP_AUTH_ENABLED=true
|
|
|
|
- INFLUXDB_ADMIN_USER=SECURE_USERNAME
|
|
- INFLUXDB_ADMIN_PASSWORD=SECURE_PASS
|
|
|
|
gitea:
|
|
image: gitea/gitea:1.9.3
|
|
container_name: gitea
|
|
networks:
|
|
- backend
|
|
restart: always
|
|
environment:
|
|
- USER_UID=1000
|
|
- USER_GID=1000
|
|
volumes:
|
|
- ${DIR}/gitea:/data
|
|
ports:
|
|
- "2221:22"
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.gitea.rule=Host(`gitea.localhost`)"
|
|
- "traefik.http.routers.gitea.entrypoints=web"
|
|
- "traefik.http.services.gitea-service.loadbalancer.server.port=3000"
|
|
|
|
|
|
whoami:
|
|
# A container that exposes an API to show its IP address
|
|
image: containous/whoami
|
|
networks:
|
|
- backend
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.whoami.rule=Host(`whoami.localhost`)"
|
|
- "traefik.http.routers.whoami.entrypoints=web"
|
|
|
|
mqtt:
|
|
image: eclipse-mosquitto:1.6.7
|
|
container_name: mqtt
|
|
networks:
|
|
- frontend
|
|
- backend
|
|
|
|
ports:
|
|
- "1885:1883"
|
|
- "9001:9001"
|
|
volumes:
|
|
- "${DIR}/mosquitto/config:/mosquitto/config"
|
|
- ${DIR}/mosquitto/data:/mosquitto/data
|
|
- ${DIR}/mosquitto/log:/mosquitto/log
|
|
labels:
|
|
- "traefik.http.routers.mqtt.rule=Host(`mqtt.localhost`)"
|
|
- "traefik.http.routers.mqtt.entrypoints=mqtt"
|
|
- "traefik.http.services.mqtt-service.loadbalancer.server.port=9001"
|
|
- "traefik.enable=true"
|
|
|
|
node-red:
|
|
image: nodered/node-red:latest
|
|
container_name: "node-red"
|
|
networks:
|
|
- backend
|
|
environment:
|
|
- TZ=Europe/Stockholm
|
|
ports:
|
|
- "1881:1880"
|
|
#devices:
|
|
#- /dev/ttyAMA0
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ${DIR}/nodered:/data
|
|
labels:
|
|
- "traefik.http.routers.node-red.rule=Host(`node.localhost`)"
|
|
- "traefik.http.routers.node-red.entrypoints=web"
|
|
- "traefik.http.services.node-red-service.loadbalancer.server.port=1880"
|
|
- "traefik.enable=true"
|
|
|
|
domoticz:
|
|
image: linuxserver/domoticz
|
|
container_name: domoticz
|
|
networks:
|
|
- backend
|
|
environment:
|
|
- PUID=1000
|
|
- PGID=1000
|
|
- TZ=Europe/Stockholm
|
|
#- WEBROOT=domoticz #optional
|
|
volumes:
|
|
- ${DIR}/domoticz:/config
|
|
ports:
|
|
- 8081:8080
|
|
#devices:
|
|
#- path to device:path to device
|
|
restart: unless-stopped
|
|
labels:
|
|
- "traefik.http.routers.domo.rule=Host(`domo.localhost`)"
|
|
- "traefik.http.routers.domo.entrypoints=web"
|
|
- "traefik.http.services.domo-service.loadbalancer.server.port=8080"
|
|
- "traefik.enable=true"
|
|
|
|
|
|
reverse-proxy:
|
|
# The official v2.0 Traefik docker image
|
|
image: traefik:v2.0.2
|
|
container_name: "traefik"
|
|
networks:
|
|
- backend
|
|
- frontend
|
|
ports:
|
|
# The HTTP port
|
|
- "80:80"
|
|
- "8080:8080"
|
|
volumes:
|
|
# So that Traefik can listen to the Docker events
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
- ./traefik.yml:/etc/traefik/traefik.yml
|
|
- ./static_config.yml:/etc/traefik/static_config.yml
|
|
labels:
|
|
- "traefik.http.routers.traefik.rule=Host(`tr.localhost`)"
|
|
- "traefik.http.routers.traefik.entrypoints=web"
|
|
- "traefik.http.services.traefik-service.loadbalancer.server.port=8080"
|
|
- "traefik.enable=true"
|
|
|
|
networks:
|
|
frontend:
|
|
external: true
|
|
backend:
|
|
external: false
|
|
|