From 16d971d8bbc9f82d83d3aee40119b179123303e2 Mon Sep 17 00:00:00 2001 From: Joe Fleming Date: Wed, 27 Nov 2019 14:33:13 -0700 Subject: [PATCH] docs: add note about REMOVE_DOWNLOAD to readme --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 980a10a..8d34c5f 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,18 @@ docker run -it --rm -p 8080:8080 -v $PWD/data:/app/data w33ble/youtube-dl-web Then hit `http://localhost:8080`, passing in a `url` and optionally a `format` query parameter for where to download from. +### Automatic cleanup + +By default, this image will both send the download in the web response as well as save it to disk. This is handy if you're saving those downloads via a volume. + +If you don't want to keep the downloads around, you can use the `REMOVE_DOWNLOAD` environment to tell the server to clean up the download after sending it in the web request. Setting the value to `1` or `true` is all it takes: + +```sh +docker run -it --rm -p 8080:8080 --env REMOVE_DOWNLOAD=1 w33ble/youtube-dl-web +``` + +Running it like this, the result from youtube-dl will only be useful from the web response. The file is cleaned up after sending so using the shared volume doesn't make sense. + ## Deploy to Docker Hub ```sh