How to update config from within Docker container?

I recently moved my home assistant setup into a docker container. I am using the official image for the pi3.

My config is mounted as a volume:

volumes:
  - /opt/home_assistant/:/config

I used to check my travis build for being successful. If the build is successful, home assistant is pulling the latest config via a script and restarts. Since I am running it inside a container now, I am unable to pull the latest config anymore.

I wonder how other people have setup home assistant within docker, to automatically integrate the latest config.

EDIT: My config is stored on Github and I ideally want to have it pulled automatically.

I have a Syncthing container pointing to the same bind mount as my config, and it syncs up in real time with my desktop/laptop when I make changes to the config. I use the config checker in the web GUI and just restart HASS if it checks out. If it fails, I usually have a running log of the container going anyway, so I see the failure and restart the container. I just make all my edits on my desktop, and syncthing handles the rest.

SSH into pi and edit files at /opt/home_assistant/
or
Pull SD card out if pi and edit files at /opt/home_assistant/ on PC
or
bind mount folder like @flamingm0e recommend and edit

Thanks for the input. I should mention, that I want to keep this process in an automated fashion. The only manual action should be the push to my config repository. I just realized, that I did not mention that my config is git based. Therefore, I would like to have the config updated and the container restarted whenever home assistant detects a valid travis build.

  • travis build verifies
  • kicks off docker script to git pull in your volume
  • restarts HA docker instance

That is what I am looking for! Any pointer to some documentation or code how to execute a local script on a travis build?

You’re thinking in the wrong direction. You have Travis build your docker container to do a git pull.