Skip to content

Commit

Permalink
Updated README to use the docker container with a host mount. fixes 2 (
Browse files Browse the repository at this point in the history
…#3)

* Updated README to use the docker container with a host mount.

* Update README.md
  • Loading branch information
ahnick authored and Algram committed Sep 23, 2018
1 parent ce5307f commit 1ddf886
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,21 @@ npm install && npm start
```

### As a docker image
#### Basic
```
docker build -t <your username>/ytdl-webserver .
docker run -p 3000:3000 -d <your username>/ytdl-webserver
```

#### Advanced
Build the docker image, create a directory to hold and access the downloaded videos on the host, and then start a container instance of the image.
```
docker build -t <your username>/ytdl-webserver .
mkdir /tmp/videos
docker run -v /tmp/videos:/home/app/public/temp -p 3000:3000 -d <your username>/ytdl-webserver
```
In the example above, we are creating a directory under /tmp to hold the videos and then specifying a host mount to the container that corresponds to that new directory. You may update this to any path on your host or use a different existing path if you would prefer. The host mount also improves performance as the downloaded files are written to the native host filesystem bypassing the CoW filesystem of the container.


## Development
To start contributing you only have to run one command.
Expand Down

0 comments on commit 1ddf886

Please sign in to comment.