-
Notifications
You must be signed in to change notification settings - Fork 37
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 container doesn't create config.json in mounted folder #32
Comments
Hi cawith, thanks for reporting this issue. Sadly volume management in docker can become tricky but we will find a solution for you. I see two ways to get through this.
I highly suggest to take the first approach because it will be much easier than the second one. The second approach also might need some additional adjustments on Kelvin's side... I assume you goal is to edit the configuration to your needs as easy as possible. In case of a container based deployment (like docker) you should use the web interface for this. Right now this isn't enabled by default (because it's not really pretty right now, lacks some features and I don't want to open ports on peoples computers without proper thought!) so we will have to enable it manually. To enable the web interface we have to edit the config.json inside the container. To do this, you can follow these steps on your Synology:
These instructions should get you going. For the sake of completeness the needed steps for the volume solution. Volumes in docker are not really suited to get existing files or folder out of a container. The core of the problem is described here: https://docs.docker.com/storage/bind-mounts/#mounting-into-a-non-empty-directory-on-the-container So the only chance to get around this would be to separate the configuration and Kelvin's binary again, as it was the case before the current release. In this case Kelvin's would have to able to load the configuration from any external folder which it can't do right now. Currently is looks for the config inside the working directory. You could get around this using file system links, but this gets even more complicated... Hope this helps!?! Let me know if you got Kelvin working! |
Hi Stefan, Thanks for your quick answer. Kelvin now works and the webinterface also works as expected.
I have another suggestion for a variable. Instead of only having schedules reacting to exact times, maybe it would be possible to add a "relative to sunset/sunrise" variable. Example: |
Hi cawith, first of all I glad you got it working. In the meantime I went for a long run, thought about this issue and came to the conclusion that both solutions (and yours as well) are way to complicated! This should be considered a bug! So let's change that first... |
Now to your questions:
Regarding your proposal: This has been broad up before in other issues. I created issue #27 to discuss and evaluate this and the future direction of Kelvin. If you are interested please feel free to comment and ask there regarding relative timestamps. (Spoiler alert: Relative timestamps come with there own issues...) Hope this helps. Feel free to ask if you have any more questions... now I will have to fix this bug! ;-) |
Ok, fixed with release v1.1.4 |
Thank you very much for clarifying. |
Hi,
Since the last Docker version, where the config.json moved to /opt/kelvin/config.json, the config.json isn't created in my mounted folder on the Synology NAS.
Kelvin is running and adjusts the lights according to the standard values, but I can't find and edit the JSON file. This was no issue with the previous release.
Thanks for the great app!
The text was updated successfully, but these errors were encountered: