From 82630616fd02f4c31d4a0166b6b9b3a71ca3fa29 Mon Sep 17 00:00:00 2001 From: Dobli <61doal1mst@hft-stuttgart.de> Date: Thu, 14 Feb 2019 13:27:35 +0100 Subject: [PATCH] Added initial template for device containers --- building_manager.py | 3 ++- template_configs/docker-templates.yml | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/building_manager.py b/building_manager.py index eec77f0..d5a3b50 100755 --- a/building_manager.py +++ b/building_manager.py @@ -1299,7 +1299,8 @@ def service_add_menu(base_dir): 'Input an all lower case identifier:', style=st).ask() if service and host and identifier: - add_postgres_service(base_dir, host, postfix=identifier) + if service == Service.POSTGRES: + add_postgres_service(base_dir, host, postfix=identifier) def service_modify_menu(base_dir): diff --git a/template_configs/docker-templates.yml b/template_configs/docker-templates.yml index 9324e95..db669fa 100644 --- a/template_configs/docker-templates.yml +++ b/template_configs/docker-templates.yml @@ -227,3 +227,14 @@ services: placement: constraints: - node.role == manager + zwave_oh: + image: docker + command: "docker run --rm --name device_oh --network habnet -v /etc/localtime:/etc/localtime:ro -v /etc/timezone:/etc/timezone:ro -v openhab_zwave_conf:/openhab/conf -v openhab_zwave_userdata:/openhab/userdata -p 9898:8080 openhab/openhab:2.4.0" + volumes: + - "/var/run/docker.sock:/var/run/docker.sock" + networks: + - habnet + deploy: + placement: + constraints: + - node.labels.device == zwave -- GitLab