From 55f8b190331776540d51109957c1f76ea3e94325 Mon Sep 17 00:00:00 2001 From: Nirvana Date: Fri, 16 Jan 2026 19:51:49 +0100 Subject: [PATCH] Reformat --- Dockerfile | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 57f2b06..17a6cf9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,7 +15,8 @@ ENV PYTHONUNBUFFERED=1 \ ULTIMATE_COUNTRY=DE \ ULTIMATE_DEBUG=false \ ULTIMATE_EPG_URL="https://example.com/epg.xml.gz" \ - PYTHONPATH=/app/lib + PYTHONPATH=/app/lib \ + DRM_PLUGINS_PATH=/drm-plugins # Install system dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ @@ -46,16 +47,24 @@ RUN pip install --no-cache-dir --upgrade pip && \ RUN groupadd -g ${GROUP_ID} ${APP_USER} && \ useradd -u ${USER_ID} -g ${APP_USER} -m -s /bin/bash ${APP_USER} +# Create directories +RUN mkdir -p /config /logs /cache /drm-plugins && \ + chown -R ${USER_ID}:${GROUP_ID} /config /logs /cache /drm-plugins + # Copy application code COPY --chown=${USER_ID}:${GROUP_ID} . . +# Create the directory structure for DRM plugins +RUN mkdir -p /app/lib/streaming_providers/base/drm/plugins && \ + chown -R ${USER_ID}:${GROUP_ID} /app/lib/streaming_providers/base/drm + +# Copy entrypoint script +COPY docker-entrypoint.sh /usr/local/bin/ +RUN chmod +x /usr/local/bin/docker-entrypoint.sh + # Quick directory check RUN ls -la /app && echo "---" && ls -la /app/lib/ 2>/dev/null || echo "lib directory not found" -# Create directories -RUN mkdir -p /config /logs /cache && \ - chown -R ${USER_ID}:${GROUP_ID} /config /logs /cache - # Switch to non-root user USER ${USER_ID} @@ -75,6 +84,6 @@ HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \ LABEL maintainer="nirvana-7777" \ description="Ultimate Backend Streaming Service" -# Simple entrypoint -ENTRYPOINT ["python", "service.py"] -CMD ["--standalone", "--config-dir", "/config"] \ No newline at end of file +# Entrypoint with wrapper script +ENTRYPOINT ["docker-entrypoint.sh"] +CMD ["python", "service.py", "--standalone", "--config-dir", "/config"] \ No newline at end of file