{"action":"created","issue":{"url":"https://api.github.com/repos/stefanwichmann/kelvin/issues/32","repository_url":"https://api.github.com/repos/stefanwichmann/kelvin","labels_url":"https://api.github.com/repos/stefanwichmann/kelvin/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/stefanwichmann/kelvin/issues/32/comments","events_url":"https://api.github.com/repos/stefanwichmann/kelvin/issues/32/events","html_url":"https://github.com/stefanwichmann/kelvin/issues/32","id":309913111,"number":32,"title":"Docker container doesn't create config.json in mounted folder","user":{"login":"cawith","id":32738355,"avatar_url":"https://avatars2.githubusercontent.com/u/32738355?v=4","gravatar_id":"","url":"https://api.github.com/users/cawith","html_url":"https://github.com/cawith","followers_url":"https://api.github.com/users/cawith/followers","following_url":"https://api.github.com/users/cawith/following{/other_user}","gists_url":"https://api.github.com/users/cawith/gists{/gist_id}","starred_url":"https://api.github.com/users/cawith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cawith/subscriptions","organizations_url":"https://api.github.com/users/cawith/orgs","repos_url":"https://api.github.com/users/cawith/repos","events_url":"https://api.github.com/users/cawith/events{/privacy}","received_events_url":"https://api.github.com/users/cawith/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-29T21:41:41Z","updated_at":"2018-03-30T12:30:36Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nSince 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.\r\nKelvin 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.\r\n\r\nThanks for the great app!"},"comment":{"url":"https://api.github.com/repos/stefanwichmann/kelvin/issues/comments/377514705","html_url":"https://github.com/stefanwichmann/kelvin/issues/32#issuecomment-377514705","issue_url":"https://api.github.com/repos/stefanwichmann/kelvin/issues/32","id":377514705,"user":{"login":"stefanwichmann","id":512174,"avatar_url":"https://avatars1.githubusercontent.com/u/512174?v=4","gravatar_id":"","url":"https://api.github.com/users/stefanwichmann","html_url":"https://github.com/stefanwichmann","followers_url":"https://api.github.com/users/stefanwichmann/followers","following_url":"https://api.github.com/users/stefanwichmann/following{/other_user}","gists_url":"https://api.github.com/users/stefanwichmann/gists{/gist_id}","starred_url":"https://api.github.com/users/stefanwichmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefanwichmann/subscriptions","organizations_url":"https://api.github.com/users/stefanwichmann/orgs","repos_url":"https://api.github.com/users/stefanwichmann/repos","events_url":"https://api.github.com/users/stefanwichmann/events{/privacy}","received_events_url":"https://api.github.com/users/stefanwichmann/received_events","type":"User","site_admin":false},"created_at":"2018-03-30T12:30:36Z","updated_at":"2018-03-30T12:30:36Z","author_association":"OWNER","body":"Hi cawith,\r\n\r\nthanks for reporting this issue.\r\n\r\nSadly volume management in docker can become tricky but we will find a solution for you. I see two ways to get through this.\r\n\r\n1) You enable the web interface as described in the README.\r\n2) We solve your problem by mounting the files to the correct place. \r\n\r\nI 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... \r\n\r\nI 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.\r\n\r\nTo 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:\r\n\r\n1) Start a container on your Synology (as you already did) without any volumes but with port 8080 mapped.\r\n2) Log into your Synology via SSH (see https://www.synology.com/en-global/knowledgebase/DSM/help/DSM/AdminCenter/system_terminal for instructions)\r\n3) Log into your running Kelvin container (see README) \r\n4) Start an editor via ```vi /opt/kelvin/config.json``` and in the section ```webinterface```change the line ```enabled: false``` into ```enabled: true```. Safe the changes and exit (```:wq``` in vi).\r\n5) Restart the running container via the Synology web interface or inside your SSH shell by running ```docker restart $CONTAINER_ID``` (see README for details)\r\n6) You should now be able to access the web interface of Kelvin on ```http://$SYNOLOGY_IP:8080/```. Here you can easily adjust the configuration to your needs.\r\n\r\nThese instructions should get you going.\r\n\r\nFor 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:\r\n\r\nhttps://docs.docker.com/storage/bind-mounts/#mounting-into-a-non-empty-directory-on-the-container\r\n\r\nSo 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...\r\n\r\nHope this helps!?! Let me know if you got Kelvin working!\r\n"}}
{"actor":{"display_login":"stefanwichmann"}}