Browse Source

init

master
Robin Thoni 6 years ago
commit
0c816953fc
5 changed files with 39 additions and 0 deletions
  1. 1
    0
      .gitignore
  2. 25
    0
      docker-compose.yml
  3. 5
    0
      env
  4. 1
    0
      openhab/Dockerfile
  5. 7
    0
      update_vars.sh

+ 1
- 0
.gitignore View File

@@ -0,0 +1 @@
1
+/data

+ 25
- 0
docker-compose.yml View File

@@ -0,0 +1,25 @@
1
+version: '2'
2
+
3
+services:
4
+    openhab:
5
+        build: ./openhab
6
+        container_name: openhab-openhab
7
+        tty: true
8
+#        restart: unless-stopped
9
+        networks:
10
+            openhab.internal.docker:
11
+                aliases:
12
+                    - openhab.openhab.internal.docker
13
+        volumes:
14
+            - ./data/openhab/addons:/openhab/addons
15
+            - ./data/openhab/conf:/openhab/conf
16
+            - ./data/openhab/userdata:/openhab/userdata
17
+        ports:
18
+            - "127.0.0.1:35110:8080"
19
+              #devices:
20
+          #            - "/dev/ttyACM0:/dev/ttyACM0"
21
+        env_file:
22
+            - env
23
+
24
+networks:
25
+    openhab.internal.docker:

+ 5
- 0
env View File

@@ -0,0 +1,5 @@
1
+SSMTP_ROOT=root@rthoni.com
2
+SSMTP_MAILHUB=172.17.0.1:10025
3
+SSMTP_MAILDOMAIN=rthoni.com
4
+
5
+NUT_ROOT_PASSWD=change_it

+ 1
- 0
openhab/Dockerfile View File

@@ -0,0 +1 @@
1
+FROM openhab/openhab:2.4.0-snapshot-amd64-debian

+ 7
- 0
update_vars.sh View File

@@ -0,0 +1,7 @@
1
+#! /usr/bin/env sh
2
+
3
+vars=$(cat env | cut -d= -f1)
4
+for docker in openhab
5
+do
6
+  echo "${vars}" > "./${docker}/vars-vars"
7
+done