Matthias Kleine 7 роки тому
батько
коміт
7e21cf0ad0
6 змінених файлів з 27 додано та 50 видалено
  1. 9 14
      docker-compose.yml
  2. 12 1
      fhem/Dockerfile
  3. 0 26
      homebridge/Dockerfile
  4. 1 1
      homebridge/config.json
  5. 5 0
      homebridge/package.json
  6. 0 8
      homebridge/start.sh

+ 9 - 14
docker-compose.yml

@@ -21,20 +21,15 @@ services:
 
     homebridge:
         restart: always
-        expose:
-            - "51826"
-            - "8282"
-            - "5353"
-        ports:
-            - "51826:51826"
-            - "8282:8282"
-            - "5353:5353"
-        build: homebridge
+        image: oznu/homebridge
         volumes:
-            - ./homebridge/start.sh:/root/start.sh
-            - ./homebridge/config.json:/root/.homebridge/config.json
-        networks:
-            - fhem-network
+            - ./homebridge/config.json:/homebridge/config.json
+            - ./homebridge/package.json:/homebridge/package.json
+        environment:
+            - TZ=Europe/Berlin
+            - PGID=1000
+            - PUID=1000
+        network_mode: host
         depends_on:
             - "fhem"
 
@@ -82,7 +77,7 @@ services:
             - "1880"
         ports:
             - "1880:1880"
-        image: nodered/node-red-docker:0.17.5
+        image: nodered/node-red-docker:0.18.4
         volumes:
             - ./nodered/data/:/data/
         networks:

+ 12 - 1
fhem/Dockerfile

@@ -1,4 +1,4 @@
-FROM debian:jessie
+FROM debian:stretch
 
 MAINTAINER Matthias Kleine <info@haus-automatisierung.com>
 
@@ -32,6 +32,10 @@ libavahi-compat-libdnssd-dev \
 libcgi-pm-perl \
 libclass-dbi-mysql-perl \
 libclass-isa-perl \
+libcrypt-cbc-perl \
+libcrypt-ecb-perl \
+libcrypt-urandom-perl \
+libcgi-pm-perl \
 libcommon-sense-perl \
 libconvert-base32-perl \
 libcrypt-urandom-perl \
@@ -40,6 +44,7 @@ libdatetime-format-strptime-perl \
 libdbd-sqlite3-perl \
 libdbi-perl \
 libdevice-serialport-perl \
+libdigest-md5-perl \
 libdpkg-perl \
 liberror-perl \
 libfile-copy-recursive-perl \
@@ -52,6 +57,8 @@ libio-socket-inet6-perl \
 libio-socket-ip-perl \
 libio-socket-multicast-perl \
 libio-socket-ssl-perl \
+libimage-info-perl \
+libimage-librsvg-perl \
 libjson-perl \
 libjson-xs-perl \
 liblist-moreutils-perl \
@@ -72,6 +79,10 @@ libtimedate-perl \
 libwww-perl \
 libxml-simple-perl
 
+RUN cpan Crypt::Rijndael_PP
+RUN cpan Net::MQTT::Simple
+RUN cpan Net::MQTT::Constants
+
 # Install fhem
 RUN echo Europe/Berlin > /etc/timezone && dpkg-reconfigure tzdata
 

+ 0 - 26
homebridge/Dockerfile

@@ -1,26 +0,0 @@
-FROM debian:jessie
-
-MAINTAINER Matthias Kleine <info@haus-automatisierung.com>
-
-ENV DEBIAN_FRONTEND noninteractive
-ENV TERM xterm
-
-# Install dependencies
-RUN apt-get update && apt-get upgrade -y --force-yes && apt-get install -y --force-yes --no-install-recommends apt-utils
-RUN apt-get install -y --force-yes xz-utils wget python libavahi-compat-libdnssd-dev
-
-RUN echo Europe/Berlin > /etc/timezone && dpkg-reconfigure tzdata
-
-RUN wget https://nodejs.org/dist/v6.9.2/node-v6.9.2-linux-x64.tar.xz -P /tmp && cd /usr/local && tar -xvf /tmp/node-v6.9.2-linux-x64.tar.xz --strip=1
-RUN ln -s /usr/local/bin/node /usr/bin/node
-
-ENV NODE_ENV production
-
-RUN apt-get install -y --force-yes make make gcc g++
-
-RUN npm install -g homebridge homebridge-fhem homebridge-http
-
-EXPOSE 51826
-
-COPY start.sh ./
-CMD bash ./start.sh

+ 1 - 1
homebridge/config.json

@@ -9,7 +9,7 @@
     {
       "platform": "FHEM",
       "name": "FHEM",
-      "server": "fhem",
+      "server": "localhost",
       "port": "8083",
       "filter": "room=Homekit"
     }

+ 5 - 0
homebridge/package.json

@@ -0,0 +1,5 @@
+{
+  "dependencies": {
+    "homebridge-fhem": "^0.4"
+  }
+}

+ 0 - 8
homebridge/start.sh

@@ -1,8 +0,0 @@
-#!/bin/bash
-
-sleep 15s
-echo "Starte Homebridge nach Wartezeit für FHEM-Update..."
-
-/etc/init.d/dbus restart
-service avahi-daemon start
-homebridge