-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (27 loc) · 1.36 KB
/
Copy pathDockerfile
File metadata and controls
40 lines (27 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# ── Stage 1: build React frontend ─────────────────────────────────────────────
FROM node:20-alpine AS frontend-build
WORKDIR /build/frontend
COPY frontend/package.json frontend/package-lock.json* ./
RUN npm install
COPY frontend/ ./
# Override outDir so built assets land in a known location within this stage
RUN npx vite build --outDir /build/dist --emptyOutDir
# ── Stage 2: Python runtime ────────────────────────────────────────────────────
FROM python:3.11-slim
WORKDIR /app
# Python deps
COPY backend/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Backend source
COPY backend/ ./backend/
# Pipeline scripts, prompt template, and static data catalogs
COPY export.py create.py channel_engine.py channel_blocks.py generate_no_ai.py generate_from_collections.py \
fetch_images.py sync_plex.py icon_engine.py badge_renderer.py PROMPT.md programming_blocks.json themed_keywords.json ./
COPY badge_assets/ ./badge_assets/
# Built React app → served as static files by FastAPI
COPY --from=frontend-build /build/dist ./backend/static/
ENV PROGRAMMARR_DATA=/data
ENV PROGRAMMARR_SCRIPTS=/app
EXPOSE 7979
WORKDIR /app/backend
CMD ["python", "main.py"]