Download or clone the repository to your system. Also, make sure docker and docker-compose are installed and functional
.
Note that you might also need to use a VPN proxy to connect to the network where the MQTT-broker is located. If so, make sure the VPN is installed and functional.
Within the config folder there is a file named config.ini.example. remove the .example
extension and edit the file in your text editor of choice.
The config file will have some placholder text. These parameters need to be configured as following:
[influxdb]
token
= the access token to the influxdb databaseurl
= the hostname or ip needed to connect to influxdborg
= the organization on influx that the bucket belongs tobucket
= the bucket (= database table) that will hold the datmeasurements
[mqtt]
topic
= the topic to subscribe to on the mqtt brokerhost
= host- or ip-address of the mqtt broker on the network
[endpoints]
disconnected
= the API endpoint to send a message to when the client gets disconnected which should be supplied with the Node server
Within the repository there are some docker files included. In a command terminal navigate to the repository folder and type the following command:
Before trying to start the docker container you should edit the Dockerfile and change Line 10, fill in your howest login details where necessary.
docker-compose up
Additionally you can add the -d
parameter to the docker-compose
command to run it in the background.
docker compose up -d
You can check if the container is running with
docker ps
Or to see all existing containers:
docker ps -a
to stop the container, you can use
docker stop <container name/ID>
Or whilst in the Datahandling folder
docker-compose stop