So it's safer to configure, as we don't need to pass env variables to a docker run service. Also it's easier to configure without needing to pass a whole lot of env vars.
1.0 KiB
1.0 KiB
Usage
Installation
The easiest way this is to run the docker container and set it to restart always. This basically makes it a system service that will always run.
To make it safe and avoid passing credentials we're using a configuration file.
mkdir /etc/solaredge_modbus_mqtt
chmod 700 /etc/solaredge_modbus_mqtt
cp config.yaml-dist /etc/solaredge_modbus_mqtt/config.yaml
docker run --name=solaredge_modbus_mqtt --restart=always --volume=/etc/solaredge_modbus_mqtt/config.yaml:/app/config.yaml marijnkoesen/solaredge_modbus_mqtt:latest
For developers
Building and running the docker image
docker build -t solaredge_modbus_mqtt:latest .
cp config.yaml-dist config.yaml
docker run --volume=$PWD/config.yaml:/app/config.yaml solaredge_modbus_mqtt:latest
Running without docker
pip3 install -r requirements.txt
cp config.yaml-dist config.yaml
python3 solaredge_modbus_mqtt.py
Running tests
pip3 install -r requirements.txt
python3 -m unittest