manga-dlp/docker/README.md
Ivan Schaller e016ed8bf7
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is failing
add docker container
2021-12-24 16:30:50 +01:00

2.2 KiB

Docker container of manga-dlp

Quick start

# with docker-compose
curl -O docker-compose.yml https://raw.githubusercontent.com/olofvndrhr/manga-dlp/master/docker/docker-compose.yml
# adjust settings to your needs
docker-compose up -d

# with docker run
docker run -v ./downloads:/app/downloads -v ./mangas.txt:/app/mangas.txt olofvndrhr/manga-dlp

Change UID/GID

You can change the UID and GID of the container user simply with:

# docker-compose.yml
  environment:
    - PUID=<userid>
    - PGID=<groupid>
docker run -e PUID=<userid> -e PGID=<groupid>

Run commands in container

You can simply use the docker exec command to run the scripts like normal.

docker exec <container name> python3 manga-dlp.py <options>

Run your own schedule

The default config runs manga-dlp.py once a day at 03:00 and fetches every chapter of the mangas listed in the file mangas.txt in the root directory of this repo.

To use your own schedule you need to mount (override) the default crontab or add new ones to the cron directory.

# docker-compose.yml
  volumes:
    - ./crontab:/etc/cron.d/01-manga-dlp # overwrites the default one
    - ./crontab2:/etc/cron.d/02-something # adds a new one
docker run -v ./crontab:/etc/cron.d/01-manga-dlp # overwrites the default one
docker run -v ./crontab2:/etc/cron.d/02-something # adds a new one

Add mangas to mangas.txt

If you use the default crontab you still need to add some mangas to mangas.txt. This is done almost identical to adding your own cron schedule. If you use a custom cron schedule you need to mount the file you specified with --read.

# docker-compose.yml
  volumes:
    - ./mangas.txt:/app/mangas.txt
docker run -v ./mangas.txt:/app/mangas.txt

Change download directory

Per default as in the script, it downloads everything to "downloads" in the scripts root directory. This data does not persist with container recreation, so you need to mount it. This is already done in the quick start section. If you want to change the path of the host, simply change ./media/mangas/ to a path of your choice.

# docker-compose.yml
  volumes:
    - ./media/mangas/:/app/downloads
docker run -v ./media/mangas/:/app/downloads