diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..a1ed87e --- /dev/null +++ b/.dockerignore @@ -0,0 +1,9 @@ +**/__pycache__ +**/*.pyc +**/*.pyo +.git +.gitignore +.paperclip +README.md +DOKUMENTATION.md +webui/cache/* diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..1c766aa --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,10 @@ +services: + xstream-webui: + build: + context: . + dockerfile: webui/Dockerfile + ports: + - "5000:5000" + volumes: + - ./webui/cache:/app/webui/cache + restart: unless-stopped diff --git a/webui/Dockerfile b/webui/Dockerfile new file mode 100644 index 0000000..b6775bf --- /dev/null +++ b/webui/Dockerfile @@ -0,0 +1,21 @@ +# Build context must be the repo root (docker compose sets this automatically) +FROM python:3.12-slim + +WORKDIR /app + +# Install dependencies first for layer caching +COPY webui/requirements.txt /app/webui/requirements.txt +RUN pip install --no-cache-dir -r /app/webui/requirements.txt + +# Copy plugin sources required at runtime +COPY plugin.video.xstream /app/plugin.video.xstream +COPY script.module.xstreamscraper /app/script.module.xstreamscraper + +# Copy the web UI itself +COPY webui /app/webui + +WORKDIR /app/webui + +EXPOSE 5000 + +CMD ["python", "app.py"]