added openhab as stack member

This commit is contained in:
Gorden Mende
2021-09-29 09:20:04 +02:00
parent 9b6f7167be
commit bdb9956249
2 changed files with 59 additions and 32 deletions
+56 -32
View File
@@ -1,44 +1,68 @@
version: "3.7" version: "3.7"
services: services:
openhab:
image: openhab/openhab:milestone-debian
container_name: mon_openhab
ports:
- '8080:8080'
networks:
- 'monitoring'
env_file:
- 'openhab.env'
volumes:
- '/etc/localtime:/etc/localtime:ro'
- '/etc/timezone:/etc/timezone:ro'
- '/opt/openhab/conf:/openhab/conf'
- '/opt/openhab/userdata:/openhab/userdata'
- '/opt/openhab/addons:/openhab/addons'
deploy:
mode: replicated
replicas: 1
placement:
constraints:
- node.labels.openhab == true
influxdb: influxdb:
image: influxdb image: influxdb
container_name: graph_influxdb container_name: mon_influxdb
ports: ports:
- '8083:8083' - '8083:8083'
- '8086:8086' - '8086:8086'
- '8090:8090' - '8090:8090'
networks: networks:
- 'monitoring' - 'monitoring'
env_file: env_file:
- 'influxdb.env' - 'influxdb.env'
volumes: volumes:
- '/docker/influxdb:/var/lib/influxdb' - '/docker/influxdb:/var/lib/influxdb'
deploy: deploy:
mode: replicated mode: replicated
replicas: 1 replicas: 1
grafana: grafana:
image: grafana/grafana:latest image: grafana/grafana:latest
container_name: graph_grafana container_name: mon_grafana
ports: ports:
- "3001:3000" - "3001:3000"
networks: networks:
- 'monitoring' - 'monitoring'
env_file: env_file:
- 'grafana.env' - 'grafana.env'
user: "0" user: "0"
volumes: volumes:
- '/docker/grafana:/var/lib/grafana' - '/docker/grafana:/var/lib/grafana'
deploy: deploy:
mode: replicated mode: replicated
replicas: 1 replicas: 1
placement: placement:
constraints: constraints:
- node.labels.grafana == true - node.labels.grafana == true
networks: networks:
monitoring: monitoring:
volumes: volumes:
openhab-volume:
external: true
grafana-volume: grafana-volume:
external: true external: true
influxdb-volume: influxdb-volume:
+3
View File
@@ -0,0 +1,3 @@
USER_ID=999
GROUP_ID=994
CRYPTO_POLICY=unlimited