Skip to content

Commit

Permalink
feat: simplify docker working dir
Browse files Browse the repository at this point in the history
  • Loading branch information
sparanoid committed Dec 16, 2021
1 parent 0c3292c commit 44649c9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ RUN apk update -f \

RUN pip install --no-cache-dir --upgrade streamlink yq yt-dlp

COPY ./live-dl /opt/live-dl/
COPY ./config.example.yml /opt/live-dl/config.yml
RUN chmod a+x /opt/live-dl/live-dl
COPY ./live-dl /app/
COPY ./config.example.yml /app/config.yml
RUN chmod a+x /app/live-dl

VOLUME /opt/live-dl/
VOLUME /app/

ENTRYPOINT ["/opt/live-dl/live-dl"]
ENTRYPOINT ["/app/live-dl"]
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,19 @@ Run live-dl with host volume mounted:
```bash
# Mount host volume for download directory:
docker run --rm -itd \
-v $(pwd)/downloads:/opt/live-dl/downloads \
-v $(pwd)/downloads:/app/downloads \
sparanoid/live-dl:latest \
'UC1opHUrw8rvnsadT-iGp7Cg'

# Mount host volume for custom config.yml:
docker run --rm -itd \
-v $(pwd)/config.yml:/opt/live-dl/config.yml \
-v $(pwd)/config.yml:/app/config.yml \
sparanoid/live-dl:latest \
'UC1opHUrw8rvnsadT-iGp7Cg'

# Mount host volume for custom cookies.txt:
docker run --rm -itd \
-v $(pwd)/youtube.com_cookies.txt:/opt/live-dl/cookies.txt \
-v $(pwd)/youtube.com_cookies.txt:/app/cookies.txt \
sparanoid/live-dl:latest \
'UC1opHUrw8rvnsadT-iGp7Cg'
```
Expand All @@ -89,9 +89,9 @@ x-defaults: &defaults
image: sparanoid/live-dl:latest
restart: always
volumes:
- ./config.yml:/opt/live-dl/config.yml
- ./youtube.com_cookies.txt:/opt/live-dl/cookies.txt
- ./downloads:/opt/live-dl/downloads
- ./config.yml:/app/config.yml
- ./youtube.com_cookies.txt:/app/cookies.txt
- ./downloads:/app/downloads

services:
minatoaqua:
Expand Down Expand Up @@ -138,7 +138,7 @@ docker compose up [--build]
# Method 2: Use Dockerfile
docker build -t sparanoid/live-dl:local .
docker run -it -v $(pwd):/opt/live-dl sparanoid/live-dl:local
docker run -it -v $(pwd):/app sparanoid/live-dl:local
```

If you'd like to run it locally. You need to install all the dependencies defined in `live-dl`.
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ x-defaults: &defaults
environment:
- _PARAM_BASE_DIR=testdir
volumes:
- .:/opt/live-dl
- .:/app

services:
# testlive:
Expand Down

0 comments on commit 44649c9

Please sign in to comment.