alexellis/phototimer

Mounting a custom config in container does not work.

EmilZahariev opened this issue · 3 comments

Hi. Really great stuff. The default command to begin the time lapse, docker run --name capture -v /media/pi/TIMELAPSE:/var/image --privileged --restart=always -e TZ="Europe/Sofia" -d alexellis2/phototimer:0.1 works fine and creates a directory structure in the /media/pi/TIMELAPSE directory that is /year/month/day/hour/milisec.jpg. However, this has the default config.py that works from 04 am to 20 pm. When I run run the following command to modify it:
docker run --name captureModed -v ``pwd``/phototimer/config.py:/root/images/config.py -v /media/pi/TIMELAPSE:/var/image --privileged --restart=always -e TZ="Europe/Sofia" -d alexellis2/phototimer:0.1, the container runs, even after a reboot, but I get no new directory structure under the default path. There is no new folder with the date of the next day. The modified container is the only one I have running. Is there any way to fix this?

Edit: Upon examination it does mount the new config. But still doesn't take photos, unlike the default command specified above.

Figured it out. The problem was that in the config.py in the default container, with no override, the base_path was set to /var/image. This differed in my custom config and once the base path was set to /var/image it worked.

Glad you were able to work this out @EmilZahariev and thanks for your feedback.

Do you think the README needs an update?

@alexellis Sorry for the late reply. The README could use an update regarding this, the setup for 24 hour recording and the directory structure (/year/month/day/hour/milisec.jpg). The 24 hour recording I achieved by setting config["am"] = 000 and config["pm"] = 2359.