Sign inSign up

plaquette/premiumizer

By plaquette

Updated almost 2 years ago

premiumizer fork with relaxed rights

Image
0

210

plaquette/premiumizer repository overview

This is a fork from: https://github.com/neox387/premiumizer

but with a way more relaxed rights management than the original.

(only dockerfile and entrypoint where changed)

FROM python:3.11.9-alpine3.19

WORKDIR /app
COPY requirements.txt requirements.txt
COPY premiumizer .

RUN apk add --update --no-cache libffi-dev openssl-dev build-base su-exec shadow

RUN pip install --no-cache-dir -r requirements.txt

# Set permissions for all users on key directories to ensure accessibility
RUN mkdir -p /conf /home/downloads /home/blackhole && \
    chmod -R 777 /conf /home/downloads /home/blackhole

VOLUME /conf
EXPOSE 5000

ENTRYPOINT ["/bin/sh","docker-entrypoint.sh"]
CMD ["/usr/local/bin/python", "premiumizer.py"]
#!/usr/bin/env sh

# Set default PUID and PGID to match the container environment, if necessary
PUID=${PUID:-0}
PGID=${PGID:-0}

# Apply permissions to allow all users to read/write in essential directories
chown -R "$PUID:$PGID" /conf /home/downloads /home/blackhole || true
chmod -R 777 /conf /home/downloads /home/blackhole || true

# Set umask to allow all users to create files with full permissions
umask 0000

# Run the application without user restriction
exec "$@"

and a corresponding docker-compose

services:
  premiumizer:
    container_name: premiumizer
    image: plaquette/premiumizer:dev 

    ports:
      - 5000:5000
    volumes:
      - .../premiumizer/demo/config:/conf
      - .../premiumizer/demo/downloads:/home/premiumizer/downloads
      - .../premiumizer/demo/nzb:/home/premiumizer/blackhole
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/London

Tag summary

Content type

Image

Digest

sha256:d7cd26296

Size

134.7 MB

Last updated

almost 2 years ago

docker pull plaquette/premiumizer:pi