You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+57-15Lines changed: 57 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,30 +46,72 @@ echo "log.info 'get ma a coffee' > /opt/mqtt-smarthome/scripts/test1.coffee
46
46
```mqtt-scripts -d /opt/mqtt-smarthome/scripts```
47
47
48
48
49
+
### Run with Docker
50
+
51
+
To run with Docker, use either a [pre-build image](https://hub.docker.com/r/dersimn/mqtt-scripts) or build one your own. Either way, just substitude the node-command you would have used by the Docker command, for e.g.:
52
+
53
+
```mqtt-scripts --help```
54
+
55
+
becomes
56
+
57
+
```docker run dersimn/mqtt-scripts --help```
58
+
59
+
An example for a productive configuration would be:
60
+
61
+
```
62
+
docker run -d --restart=always --name=logic \
63
+
-e "TZ=Europe/Berlin" \
64
+
-v /opt/hma/etc/scripts:/scripts:ro \
65
+
dersimn/mqtt-scripts \
66
+
--url mqtt://10.1.1.50 \
67
+
--dir /scripts
68
+
```
69
+
70
+
Configure via `MQTTSCRIPTS_` env variables when using Docker Compose.
71
+
72
+
73
+
#### Build
74
+
75
+
To build a Docker image yourself use the following workflow:
0 commit comments