Open digital-dann opened 3 years ago
Interesting. I like this because for people who don't need to make changes to the software, it gets around all of the pain of getting the native node modules to compile with a specific Node version. It's also a pleasant surprise that the bluetooth stack is accessible in the container.
It would be nice to just build an "official" container and put it in a public registry, though GitHub's Runners appear to only support x86 right now and I don't think there is an easy free way to do this in ARM with a self-hosted runner.
I'll give this some more thought if there is a better way to incorporate this.
It would be simple enough to create a DOCKER.md file with this information and just link to it from the README.md. If you create a Docker Hub repo for this, I would be willing to upload images for this. You may want to start creating releases in Github to match the docker image releases as well.
Beyond this, there are many things that can be done to improve the MQTT compatibility and also ways to tweak the Docker image to make it much more user friendly. I'm open to submitting merge requests.
Turns out I was wrong earlier, docker buildx
works on the GitHub runners, so while slow I can indeed have the CI pipeline build arm and arm64 containers. I tested a container built this way on a Pi 3 with 32bit PiOS and it seems to work, but I'd love for you to give it a try too. You can try this compose file.
https://github.com/gleeds/cloudbbq/blob/master/docker-compose.yml
I think for this container to be generally friendly to use, cloudbbq would need a better configuration system (Kinda like what Spring Boot does) that can load from both a config file or from environmental variables.
Also, I'm interested in what MQTT changes you'd like to see. In the past I tried to get it to work with AWS IoT Core but couldn't get past their more complex auth system at the time.
After some fiddling, I found a way to build a Docker container for this. Docker my preferred way to run this, even on a Raspberry Pi. Some people might find this useful, too:
Dockerfile
docker-entrypoint.sh
docker-compose.yml