From 8b4d13a418f73356e41ad566f51a3bf6f4046c7f Mon Sep 17 00:00:00 2001 From: Kevin Brey Date: Wed, 5 Dec 2018 03:25:30 -0600 Subject: [PATCH] docs(readme): update language to account for recent changes --- README.md | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 0b6aba72..73eb02f9 100644 --- a/README.md +++ b/README.md @@ -4,35 +4,50 @@ # youtube-dl-server -Very spartan and opinionated Web / REST interface for downloading youtube videos onto a server. [`bottle`](https://github.com/bottlepy/bottle) + [`youtube-dl`](https://github.com/rg3/youtube-dl). +Very spartan Web and REST interface for downloading youtube videos onto a server. [`bottle`](https://github.com/bottlepy/bottle) + [`youtube-dl`](https://github.com/rg3/youtube-dl). ![screenshot][1] -## How to use this image +## Running -### Run on host networking +### Docker CLI -This example uses host networking for simplicity. Also note the `-v` argument. This directory will be used to output the resulting videos +This example uses the docker run command to create the container to run the app. Here we also use host networking for simplicity. Also note the `-v` argument. This directory will be used to output the resulting videos ```shell docker run -d --net="host" --name youtube-dl -v /home/core/youtube-dl:/youtube-dl kmb32123/youtube-dl-server ``` -### Alpine +### Docker Compose -There is now a working image based on Alpine linux that is much smaller. This will likely become the main image in the future +This is an example service definition that could be put in `docker-compose.yml`. This service uses a VPN client container for its networking. + +```yml + youtube-dl: + image: "kmb32123/youtube-dl-server" + network_mode: "service:vpn" + volumes: + - /home/core/youtube-dl:/youtube-dl + restart: always +``` + +### Python + +If you have python ^3.3.0 installed in your PATH you can simply run like this, providing optional environment variable overrides inline. ```shell -docker run kmb32123/youtube-dl-server:alpine +sudo YDL_SERVER_PORT=8123 python3 -u ./youtube-dl-server.py ``` +## Usage + ### Start a download remotely Downloads can be triggered by supplying the `{{url}}` of the requested video through the Web UI or through the REST interface via curl, etc. #### HTML -Just navigate to `http://{{address}}:8080/youtube-dl` and enter the requested `{{url}}`. +Just navigate to `http://{{host}}:8080/youtube-dl` and enter the requested `{{url}}`. #### Curl @@ -42,8 +57,8 @@ curl -X POST --data-urlencode "url={{url}}" http://{{address}}:8080/youtube-dl/q ## Implementation -The server uses [`bottle`](https://github.com/bottlepy/bottle) for the web framework and [`youtube-dl`](https://github.com/rg3/youtube-dl) to handle the downloading. For better or worse, the calls to youtube-dl are made through the shell rather then through the python API. +The server uses [`bottle`](https://github.com/bottlepy/bottle) for the web framework and [`youtube-dl`](https://github.com/rg3/youtube-dl) to handle the downloading. The integration with youtube-dl makes use of their [python api](https://github.com/rg3/youtube-dl#embedding-youtube-dl). -This docker image is based on [`python:3-onbuild`](https://registry.hub.docker.com/_/python/) and consequently [`debian:jessie`](https://registry.hub.docker.com/u/library/debian/). +This docker image is based on [`python:alpine`](https://registry.hub.docker.com/_/python/) and consequently [`alpine:3.8`](https://hub.docker.com/_/alpine/). -[1]: https://raw.githubusercontent.com/manbearwiz/youtube-dl-server/master/youtube-dl-server.png +[1]:youtube-dl-server.png