Homelabtoolkit v1
This commit is contained in:
+12
@@ -1,3 +1,12 @@
|
||||
# ── Stage 1: build the React SPA ─────────────────────────────────────────────
|
||||
FROM node:20-slim AS frontend
|
||||
WORKDIR /frontend
|
||||
COPY frontend/package.json frontend/package-lock.json* ./
|
||||
RUN npm install
|
||||
COPY frontend/ ./
|
||||
RUN npm run build
|
||||
|
||||
# ── Stage 2: Python runtime ──────────────────────────────────────────────────
|
||||
FROM python:3.11-slim
|
||||
|
||||
ENV PYTHONDONTWRITEBYTECODE=1 \
|
||||
@@ -17,6 +26,9 @@ RUN python -m pip install --upgrade pip \
|
||||
|
||||
COPY . .
|
||||
|
||||
# Bring in the built SPA from the frontend stage.
|
||||
COPY --from=frontend /frontend/dist ./frontend/dist
|
||||
|
||||
RUN mkdir -p /app/cache /app/output
|
||||
|
||||
EXPOSE 8500
|
||||
|
||||
Reference in New Issue
Block a user