Skip to content

Conversation

@pvulgaris
Copy link

In preparation for Docker-izing tut.py, made a few minor tweaks to logging that would've been helpful while figuring out the codebase early on. Also added a dateutil to requirements which was missing from a fresh install on MacOS as well as Docker.

Add the object ID to description for easier debugging. Needed to temporarily unblock a copy operation that was stuck on one particular ID.
Missing on default install.
Spent way too long debugging why a fresh install allowed "search" command to work, but not "copy". Turns out I had forgotten to run "config" first. The confusing part is that "search" seems to implicitly select a device while "copy" does not. Either way, using __get_uri() avoids some copy/paste URI generation and presents a better error message ("No device selected.") that would've been useful for initial debugging.
@pvulgaris pvulgaris marked this pull request as ready for review October 13, 2023 16:15
Defaults from "docker init".
First version of Docker config to search for all available videos and
sync them to bind mounted folder at /home/appuser/Tablo. Some hacks to
enable functioning in Synology DSM 7.2's Container Manager. Assumes that
Tablo directory has already been configured with a command like:

> ./tut.py config --discover

Tested it locally in MacOS with Tablo mounted shared folder:

> docker build -t pvulgaris/tut-syncer:arm64 .
> docker run --name tut-syncer --mount type=bind,source=/Volumes/video/Tablo,target=/home/appuser/Tablo pvulgaris/tut-syncer:arm64

Then build amd64 version for upload to Docker Hub and use on DS224+:

> docker buildx build -t pvulgaris/tut-syncer:amd64 --platform linux/amd64 .

Finally, use the DSM api to setup a job with Task Scheduler as described
in https://www.reddit.com/r/synology/comments/10wkxuc/restart_docker_container/
Create a new task in Task Scheduler and run the following as root
(replacing pvulgaris-tut-syncer-1 with the container name):

> synowebapi --exec api=SYNO.Docker.Container method="start" version=1 name="pvulgaris-tut-syncer-1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant