Browse Source

init

tags/v1.0.0^0
Robin Thoni 6 months ago
commit
7a859dcaa8
Signed by: Robin THONI <robin@rthoni.com> GPG Key ID: 4E09DEF46B99E61E
3 changed files with 102 additions and 0 deletions
  1. 2
    0
      .gitignore
  2. 53
    0
      docker-compose.yml
  3. 47
    0
      openzwave-cp/Dockerfile

+ 2
- 0
.gitignore View File

@@ -0,0 +1,2 @@
1
+data
2
+.idea

+ 53
- 0
docker-compose.yml View File

@@ -0,0 +1,53 @@
1
+version: '2'
2
+services:
3
+#  openzwave:
4
+#    image: openzwave/ozwdaemon
5
+#    networks:
6
+#      main:
7
+#        aliases:
8
+#          - openzwave.main.internal.docker
9
+#    environment:
10
+#      MQTT_SERVER: mqtt.main.internal.docker
11
+#      USB_PATH: /dev/ttyUSB0
12
+#      TZ: Europe/Paris
13
+#    devices:
14
+#      - /dev/ttyACM0:/dev/ttyUSB0
15
+#    volumes:
16
+#      - ./data/openzwave/config:/opt/ozw/config
17
+#    ports:
18
+#      - 127.0.0.1:1983:1983
19
+#  mqtt:
20
+#    image: eclipse-mosquitto
21
+#    networks:
22
+#      main:
23
+#        aliases:
24
+#          - mqtt.main.internal.docker
25
+#    environment:
26
+#      TZ: Europe/Paris
27
+#  openzwave-cp:
28
+#    build: ./openzwave-cp
29
+#    networks:
30
+#      main:
31
+#        aliases:
32
+#          - openzwave-cp.main.internal.docker
33
+#    volumes:
34
+#      - ./data/openzwave/config:/root/config
35
+#    ports:
36
+#      - 127.0.0.1:8090:8090
37
+  openzwave-cp:
38
+    image: ruimarinho/openzwave
39
+    networks:
40
+      main:
41
+        aliases:
42
+          - openzwave-cp.main.internal.docker
43
+    environment:
44
+      TZ: Europe/Paris
45
+    devices:
46
+      - /dev/ttyACM0:/dev/ttyACM0
47
+    volumes:
48
+      - ./data/openzwave/config:/opt/ozw/config
49
+    ports:
50
+      - 127.0.0.1:1983:1983
51
+      - 127.0.0.1:8090:8090
52
+networks:
53
+  main:

+ 47
- 0
openzwave-cp/Dockerfile View File

@@ -0,0 +1,47 @@
1
+FROM debian:buster AS builder
2
+
3
+RUN apt-get update && \
4
+      DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -yq \
5
+      ca-certificates \
6
+      libmicrohttpd-dev \
7
+      libudev-dev \
8
+      git \
9
+      gcc \
10
+      g++ \
11
+      make \
12
+      && \
13
+      apt-get clean && \
14
+      rm -rf /var/lib/apt/lists/*
15
+
16
+WORKDIR /tmp/
17
+
18
+RUN git clone --depth 1 https://github.com/OpenZWave/open-zwave
19
+
20
+RUN git clone --depth 1 https://github.com/OpenZWave/open-zwave-control-panel
21
+
22
+WORKDIR /tmp/open-zwave/
23
+
24
+RUN make -j 10
25
+
26
+WORKDIR /tmp/open-zwave-control-panel/
27
+
28
+RUN mkdir config && make -j 10 dist
29
+
30
+FROM debian:buster
31
+
32
+RUN apt-get update && \
33
+      DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -yq \
34
+      libmicrohttpd12 \
35
+      tar \
36
+      gzip \
37
+      && \
38
+      apt-get clean && \
39
+      rm -rf /var/lib/apt/lists/*
40
+
41
+COPY --from=builder /tmp/open-zwave-control-panel/ozwcp.tar.gz /tmp/
42
+
43
+WORKDIR /root/
44
+
45
+RUN tar xf /tmp/ozwcp.tar.gz
46
+
47
+CMD ["./ozwcp"]

Loading…
Cancel
Save