New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docker image for a complete emoncms installation and Home-Assistant add-on #1858
Comments
@alexandrecuer - this is really good. Not had a chance to test it, but assuming it works it is magic. @TrystanLea @glynhudson - I'd suggest we have an OEM Repo for this.
Can I check, are you running the MariaDB inside the same container on HA? |
Sounds good, I've just tested it. I found I needed to add
It seems to work well, I tested connecting to the MQTT server and posting some data via MQTT. Nice work. It would be great to have this as a repo on the emoncms github, if I was to create a repo would you be happy to push it up? What do you think we should call the repo? Or alternatively we could just link to your repo? I would be happy with either, maybe it's easiest to add a note to our existing |
I think it would be better as a repo on the OEM Organisation with @alexandrecuer as a contributor to it so he can update it directly. |
Thanks for the feedback @glynhudson, I would say it depends on what you want to do in the future :
in case 1, the folder name in the OEM Organisation could be in case 2, well, no need to maintain another repo from your side. Just link to my repo from the emoncms main README, in the install section : https://github.com/emoncms/emoncms#install in case 3, if you feel it's good to leave the repo on the emoncms organisation, just use If you prefer like @borpin to go for the OEM organisation, you can keep github actions needs to be reconfigured with Repository secrets in order to send the builds to your docker hub (https://hub.docker.com/r/openenergymonitor/) There is also a nice option (which I have not tested yet) to publish to github packages (https://docs.github.com/en/actions/publishing-packages/publishing-docker-images#publishing-images-to-github-packages) |
Added a new build including emoncms version number, using the stable release the latest docker image has got the following tag : alexjunk/emoncms:alpine3.18_emoncms11.4.5
nota : the docker image used in the home-assistant addon is right now the one without version number… |
created this page as a documentation : https://emoncms-docker.github.io |
It is not an issue but rather a sort of overview of emoncms and docker
@TrystanLea : maybe I should move this somewhere else ?
I've explored the existing projects around making work emoncms in a docker container :
I may be wrong or not enough skilled with docker but but I haven't found anything that's totally self-contained and easy to handle.
So I've recently worked on a self-contained docker image for Emoncms using Alpine3.16, with modules graph, postprocess, sync, backup and dashboard, and based on the s6-overlay init system : https://github.com/just-containers/s6-overlay/
The result is a small multiarch image (aarch64, amd64, arm/v7) that can work as a Home-Assistant add-on but also as a standalone docker image if you are not in the Home-Assistant ecosystem
It is quite easy to operate as everything is inside : apache, redis, mariadb, mosquitto, the three main workers feedwriter, service-runner and emoncms-mqtt are operating as s6-services. So no configuration, you can change the mqtt username and password if you want, but that is the only thing you'll have to do, you don't have to run a specific container for mariadb.
It was not heavily tested but I checked in depth everything was working fine, including the modules side, so feel free to give a try if you have time....
the repo to include in the Home-Assistant add-on store, with everything necessary for the docker builds :
https://github.com/Open-Building-Management/emoncms
if not using Home-Assistant, and want to test the image, without any data persistency :
if you want persistent datas, create a folder named data on the host and start emoncms with a volume :
more details here : https://github.com/Open-Building-Management/emoncms/blob/main/DOCS.md
The text was updated successfully, but these errors were encountered: