Backend Services
These may not all be backend services in the traditional sense, but in my system, they are all used as supporting infrastructure.
InfluxDB - Time series database
- Main: https://www.influxdata.com/
- Github: https://github.com/influxdata/influxdb
- Documentation: https://docs.influxdata.com/influxdb/v2.0/
Notes:
- STATUS: In use, long term storage for relevant Home Assistant data (ex. weather, power, etc.)
MQTT - Eclipse Mosquitto - IoT Messaging
- Main: https://mqtt.org/
- Github: https://github.com/eclipse/mosquitto
- Documentation: https://mqtt.org/getting-started/
- Setup:
- Issue: permissions issue with initial setup
- Fix: Ssh in as admin and run this cmd:
chown -R 1883:1883 /share/CACHEDEV1_DATA/Docker/mosquitto
- Fix: Ssh in as admin and run this cmd:
- Issue: permissions issue with initial setup
- Reference:
- Tools
- IoTLink - sends Windows device data via MQTT for consumption by Home Assistant
- MQTT Explorer - (think file explorer for MQTT)
Notes:
- STATUS: In use, transports various IoT data for Home Assistant (Windows data, Blue Iris, Shelly Bluetooth, etc.)
Node-RED - Home automation
See dedicated section on this topic.
Notes:
- STATUS: Active - Node-Red is an essential service in my system as it is effectively the automation backend for my home assistant instance.
- LIKES: Automations are quick and easy to construct once you are familiar with the visual paradigm.
pgAdmin - GUI/Tools for PostgreSQL
- Main: https://www.pgadmin.org/
- Github: https://github.com/postgres/pgadmin4
- Documentation: https://www.pgadmin.org/docs/
- Container Deployment: https://www.pgadmin.org/docs/pgadmin4/latest/container_deployment.html
- Using this image: https://hub.docker.com/r/dpage/pgadmin4/
- Container Deployment: https://www.pgadmin.org/docs/pgadmin4/latest/container_deployment.html
Portainer - Docker container management
- Main: https://www.portainer.io/
- Community Edition (CE) - 2nd half 2020: https://www.portainer.io/products/community-edition
- Github: https://github.com/portainer/portainer
- Documentation: https://documentation.portainer.io/
- Docker Updates: https://documentation.portainer.io/v2.0/upgrade/upddocker/
Notes:
- STATUS: In use, it does its job.
PostgreSQL - Database
- Main: https://www.postgresql.org/
- Github: https://github.com/postgres/postgres
- Documentation: https://www.postgresql.org/docs/
Steps to update DB across major releases
General Steps:
- Stop all services using the postgres DB
- Export all databases from postgres - see export cmd below
- Shutdown postgres
- Archive existing postgres folder (ex. postgres => postgresXX_date) in docker folder
- Create New postgres folder (ex. postgres) in docker folder
- Update docker compose to reference new postgres image and start container
- Confirm new postgres container is ready to accept connections (log file in portainer)
- Import datafile from old postgres container - see cmd below
Export/Import Commands
- Export:
docker exec -it postgres /usr/bin/pg_dumpall -U postgres > dumpfile1.sql
- Import:
docker exec -i postgres psql -U postgres < dumpfile1.sql
References:
- https://jlelse.blog/dev/migrate-postgres-docker
- https://www.cloudytuts.com/tutorials/docker/how-to-upgrade-postgresql-in-docker-and-kubernetes/
- https://josepostiga.com/how-to-upgrade-postgresql-version-and-transfer-your-old-data-using-docker/
Notes:
- STATUS: using as DB for Home Assistant, Nextcloud, and a few other containers
Syncthing - File Synchronization
- Main: https://syncthing.net/
- Doc Main: https://docs.syncthing.net/
- Github: https://github.com/syncthing/syncthing
Notes:
- STATUS: Active - replaced Nextcloud sync
Traefik - Reverse proxy
- Main: https://traefik.io/traefik/
- Doc Main: https://doc.traefik.io/traefik/
- Github: https://github.com/traefik/traefik/
- My blog post on setup and config: https://mwunderling.com/blog/traefik2.html
- Reference:
- Static File: https://docs.traefik.io/reference/static-configuration/file/
- Entrypoints - https://docs.traefik.io/routing/entrypoints/
- Dynamic File:
- Let’s Encrypt: https://docs.traefik.io/https/acme/
- Static File: https://docs.traefik.io/reference/static-configuration/file/
- Other:
- Using influxDB to view Traefik Metrics: https://theorangeone.net/posts/traefik-influx-metrics/
Notes:
- STATUS: In-use, happy with performance, need to migrate to Traefik3