-
Notifications
You must be signed in to change notification settings - Fork 8
Basic Dockerfile and Compose Setup as a Starting Point #13
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
base: master
Are you sure you want to change the base?
Conversation
After some experimentation, I finally managed to build an image that stays running instead of crashing on startup. I used ubuntu:24.04 as the base image — definitely heavier than ideal, but it worked reliably — and set rethink-cloud.js as the container’s entry point. I'm still not entirely sure which files need to persist, but for now I’ve mounted only the configuration file (/rethink/config.json) into the container. With that in place, the output behaves exactly as described in the wiki. In my case i created a DNS Record for both common.lgthinq.com and lgthinq.mydomain.tld pointing to my server with NginX There I redirected one domain to the other. Is it posible in this case to simply use port 443 and let NginX handle the certificates ? I have not yet tried it with my ThinQ machine because I do not have a wifi enabled device where i can run rethink-setup.js This should be the output if rethink-cloud.js was correctly configured and mapped to the container root@homeserver:/services/rethink# docker compose logs -f rethink rethink | Rethink cloud ready rethink | During setup, please ensure that connections to common.lgthinq.com:443 are redirected to lgthinq.mydomain.tld:443 rethink | HA mqtt connection established This byfar not a production ready solution but it is just a start to get things working
I have created a Dockerfile with a Compose file to test the cloud server. It worked for me with the included ENV values I would now create a Docker Image to be published on Docker Hub or Github. Automating the process and creating tests before publishing is good practice
|
I created a complete Docker deployment setup for your Rethink project by writing a |
|
I’ve been testing different configurations to see what works reliably with the Docker image, and here’s what I found: The connection fails when changing the certificate locations. For example: Because of that, creating a dedicated cert directory and mounting it like this If port |
|
Thank you for this work. I'll try to review it soon - hopefully :) The use-case with the reverse proxy was not what I've had in mind - but it's certainly reasonable. I'll try to find a good way to support this scenario. |
|
I’ve made major improvements, and I can say it’s now ready for testing: I created a Depending on the I think the only inconvenience is provisioning new devices in the cloud/bridge services. Additionally, we might need a way to automatically copy the The certificate generated by the cloud service is copied into I hope this helps. It was a great learning experience for me to build all of this. |
Ensure /config directory is created before usage.
Updated comments for clarity regarding MQTT settings, internal server ports, and server mode.
Consider removing unneeded files after build to optimize image size.
|
Thanks again. I didn't have time to review this yet - so far I've been focusing on adding support for new devices, docker integration is more of a "nice to have" feature for me. I've had a bit of a different approach in mind with the bridge service. The standalone "bridge" tool was meant as an experiment. Ideally, the main |
|
Perfectly understandable. It is just meant for ease of use. I usually test such projects in VMs or Containers and I just wanted to share in case others wanted to test it as well |
After some experimentation, I finally managed to build an image that stays running instead of crashing on startup. I used
ubuntu:24.04as the base image — definitely heavier than ideal, but it worked reliably — and setrethink-cloud.jsas the image entry point. I'm still not entirely sure which files need to persist, but for now I’ve mounted only the configuration file/rethink/config.jsoninto the container. With that in place, the output behaves exactly as described in the wiki:In my case i created a DNS Record for both
common.lgthinq.comandlgthinq.mydomain.tldpointing to my server with NginX. There I redirected one domain to the other. Is it posible in this case to simply use port 443 and let NginX handle the certificates ?I have not yet tried it with my ThinQ machine because I do not have a wifi enabled device where i can run
rethink-setup.jsSo the image is not yet tested.This byfar not a production ready solution but it is just a start to get things working