@@ -130,6 +130,8 @@ It is now possible to start, stop, restart and check the status of sml2mqtt with
130
130
Docker
131
131
======================================
132
132
133
+ Stable release (currently 2.2)
134
+ ------------------------------
133
135
134
136
Installation through `docker <https://hub.docker.com/r/spacemanspiff2007/sml2mqtt >`_ is available:
135
137
@@ -143,3 +145,49 @@ There the ``config.yml`` will be used or a new ``config.yml`` will be created
143
145
144
146
The analyze option can also be set through an environment variable
145
147
(see :ref: `command line interface <COMMAND_LINE_INTERFACE >`).
148
+
149
+ Easiest way to run a docker with a locally mounted volume:
150
+
151
+ .. code-block :: bash
152
+
153
+ mkdir sml2mqtt
154
+ docker run -v $( pwd) /sml2mqtt:/sml2mqtt spacemanspiff2007/sml2mqtt:latest
155
+ # This will quit after a few seconds (with an error on the logs at sml2mqtt/sml2mqtt.log)
156
+ vi sml2mqtt/config.yml
157
+ # Edit the config according to your needs
158
+ docker run -v $( pwd) /sml2mqtt:/sml2mqtt spacemanspiff2007/sml2mqtt:latest
159
+ # This schould now continue running, check with
160
+ docker ps
161
+
162
+ Building the docker image from source
163
+ -------------------------------------
164
+
165
+ First you need to create a fresh docker image, then it is mostly similar to the above.
166
+
167
+ .. code-block :: bash
168
+
169
+ cd ~
170
+ mkdir GIT
171
+ cd GIT
172
+ git clone https://github.com/spacemanspiff2007/sml2mqtt.git
173
+ cd sml2mqtt
174
+ docker built -t sml2mqtt .
175
+ cd ~
176
+ mkdir -p dockerdata/sml2mqtt
177
+ cd dockerdata
178
+ docker run -v $( pwd) /sml2mqtt:/sml2mqtt sml2mqtt
179
+
180
+ # This will quit after a few seconds (with an error on the logs at
181
+ # sml2mqtt/sml2mqtt.log)
182
+ # Now edit the config according to your needs and start again
183
+ vi sml2mqtt/config.yml
184
+ docker run -v $( pwd) /sml2mqtt:/sml2mqtt sml2mqtt
185
+
186
+ # This schould now continue running, if everything runs for a minute
187
+ # interrupt it with Ctrl-C and start the container in detached mode
188
+ docker run -d -v $( pwd) /sml2mqtt:/sml2mqtt sml2mqtt
189
+
190
+ # Check if it is running
191
+ docker ps -a
192
+
193
+ You can further adjust the config to process the values and restart docker...
0 commit comments