marcopeocchi / yt-dlp-web-ui

A terrible web ui for yt-dlp. Designed to be self-hosted.
Mozilla Public License 2.0
664 stars 68 forks source link

Templates don't persist when removing the docker container #161

Open ioqy opened 4 days ago

ioqy commented 4 days ago

Version running latest docker build

Describe the bug The templates are either gone after recreating the continer (e.g. with docker compose down and docker compose up) or the default templates default and audio only are added even though they have been deleted.

After a bit of searching I found that the templates are stored in the /config directory. So I added it as a volume to the docker compose file but the local.db gets either completely overwritten after the container is recreated or the default templates are added again.

Additional context It would be nice to already have the /config directory in the docker compose example instead of having to "reverse engineer" where things are stored.

marcopeocchi commented 1 day ago

hello @ioqy,

If the dockerfile entrypoint is not overwritten and the /config volume set, the local.db will not be recreated. As for the default templates: they're re-added since if the container is recreated or restarted the application lose its "state".

The docker-compose.yml example has been updated in 98f0ea3bd2490f8ce94715113204bf155a767cde.

ioqy commented 1 day ago

As for the default templates: they're re-added since if the container is recreated or restarted the application lose its "state".

I would have expected that the database is for keeping the "state".

The docker-compose.yml example has been updated in 98f0ea3.

That's great!