Docker stack with persistent data volumes for IoT data logging projects.
The init folders contain first run configurations where necessary,
MySQL users, schema, Grafana datasource etc.
The docker-compose.yml file may be used as a template for other projects.
In this case make sure to:
- Clean up the
initvolumes definitions indocker-compose.yml. - Create volumes before first
docker-compose upto avoid permission issues
Once the containers are successfully built and running:
-
Create schema and table in MySQL workbench
-
Set MySQL datasource IP in Grafana.
-
Secure NodeRED
Create and copy hashed password
docker exec -it nodered npx node-red admin hash-pwdocker-compose stop node-redUncomment the adminAuth section in settings.js and paste the hashed password.
Start NodeRED
docker-compose start node-red
Install node-red-contrib-stackhero-mysql to avoid ER_NOT_SUPPORTED_AUTH_MODE error.
Import .json flow containing example INSERT function.