Homelabtoolkit v2

This commit is contained in:
2026-06-08 21:58:16 +12:00
parent 040fbacc70
commit 3c77066beb
75 changed files with 16945 additions and 374 deletions
+11 -6
View File
@@ -2,7 +2,7 @@
FROM node:20-slim AS frontend
WORKDIR /frontend
COPY frontend/package.json frontend/package-lock.json* ./
RUN npm install
RUN npm ci || npm install
COPY frontend/ ./
RUN npm run build
@@ -21,16 +21,21 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt ./
RUN python -m pip install --upgrade pip \
&& python -m pip install -r requirements.txt
RUN python -m pip install --no-cache-dir -r requirements.txt
COPY . .
# Copy only what the server actually runs — keeps the final image lean and avoids
# baking in frontend sources, tests, legacy scripts and unused root assets.
COPY app.py ./
COPY rotate_preroll.py ./
COPY services/ ./services/
COPY static/ ./static/
# Bring in the built SPA from the frontend stage.
COPY --from=frontend /frontend/dist ./frontend/dist
RUN mkdir -p /app/cache /app/output
RUN mkdir -p /app/cache /app/output /app/logs
EXPOSE 8500
CMD ["python", "-m", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8500"]
# Single worker (lean memory) and no access log (less CPU + log noise).
CMD ["python", "-m", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8500", "--no-access-log"]