This PR refactors Dockerfile a bit and adds logging facility in order to additionally log into a file
In particular, this PR include these commits:
Refactor Dockerfile: install npm dependencies on image build time and only run youtube-to-anchorfm when container is starting
Refactor Dockerfile: remove workdir since github actions runs the docker image with different workdir
Implement logging to file and create a png screenshot file in the directory where logs are kept
The logs are configured to be kept in ./logs. The screenshot is configured to be saved in ./logs/screenshot.png. This change will be useful in the scenario where youtube-to-anchorfm is run with the docker image. IT should be possible to mount a volume in order to see the logs and the screenshot. Note that the log format is the same in the console, i.e the users won't notice a difference when using youtube-to-anchorfm with github action.
Fix problem of program hanging infinitely when selecting schedule date that is a lot of months difference from current date
When scheduling a date that is a lot of months away or before current date, it requires clicking on the calendar for changing month a lot of times. Sometimes this hands the program forever. The implemented solution adds a 500ms sleep on every click on calendar that changes month
Add a connection timeout to youtube-dl calls so it will fail if there is no internet connection instead of waiting indefinitely
youtube-dl calls for getting video info or downloading might hand indefinitely if there is no internet connection. This commit fixes that by adding a connection timeout
Use absolute path specification for target when mounting package.json and package-lock.json in Dockerfile
This helps to make Dockerfile compatible with podman build
This PR refactors Dockerfile a bit and adds logging facility in order to additionally log into a file
In particular, this PR include these commits:
./logs
. The screenshot is configured to be saved in./logs/screenshot.png
. This change will be useful in the scenario where youtube-to-anchorfm is run with the docker image. IT should be possible to mount a volume in order to see the logs and the screenshot. Note that the log format is the same in the console, i.e the users won't notice a difference when using youtube-to-anchorfm with github action.package.json
andpackage-lock.json
inDockerfile
This helps to makeDockerfile
compatible withpodman build