Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
config.example
Dockerfile
docker-compose.yml
docker-compose.*.yml
logo*
README.md
venv
35 changes: 35 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: docker

on:
push:
branches: [master]

jobs:
main:
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/386,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x
push: true
tags: iw00t/redbetter:latest
-
name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,4 @@ bin/
include/
share/
lib/
docker-compose.override.yml
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM python:2-slim

RUN set -x \
&& apt-get update \
&& apt-get install -y musl lame sox flac mktorrent \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /app
ADD requirements.txt /app

RUN set -x \
&& pip install -r requirements.txt

ADD . /app

USER nobody

CMD ["/app/redactedbetter"]
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,30 @@ REDBetter caches the results of your transcodes, and will skip any transcodes it

Beware though, this will cause the script to re-check every download as it does on the first run.

### Docker example

~~~
$> cp docker-compose.override.example.yml docker-compose.override.yml
$> $EDITOR docker-compose.override.yml

# Change the volume mounts to your custom values
# Use your own 'user: uid:gid' pair

$> mkdir ~/.redactedbetter
$> chmod go-rx ~/.redactedbetter
$> $EDITOR ~/.redactedbetter/config

# Configure your username and password. Paths in this configuration file
# are valid inside the container, you shouldn't have to change them if you
# properly configured the volumes previously. (docker-compose.override.yml)

# Without arguments
$> docker-compose run --rm redbetter

# With arguments
$> docker-compose run --rm redbetter -U http://redacted.ch/torrents.php?id=1000\&torrentid=1000000
~~~

## Bugs and feature requests

If you have any issues using the script, or would like to suggest a feature, feel free to open an issue in the issue tracker, *provided that you have searched for similar issues already*.
10 changes: 10 additions & 0 deletions config.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[redacted]
username =
password =
data_dir = /data
output_dir = /output
torrent_dir = /torrents
24bit_behaviour = 0
formats = flac, v0, 320
piece_length = 18
# media =
9 changes: 9 additions & 0 deletions docker-compose.override.example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: '3'
services:
redbetter:
user: '1000:1000'
volumes:
- ${HOME}/.redactedbetter:/config
- /your/real/path:/data
- /your/real/path:/output
- /your/real/path:/torrents
5 changes: 5 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: '3'
services:
redbetter:
image: iw00t/redbetter:latest
entrypoint: ["/app/redactedbetter", "--config", "/config/config", "--cache", "/config/cache"]