Compare commits
2 Commits
62af6727e6
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| dd1b5b7318 | |||
| 636f43aa60 |
@@ -8,14 +8,9 @@ build/
|
|||||||
.env
|
.env
|
||||||
*.log
|
*.log
|
||||||
.git/
|
.git/
|
||||||
dashboard/src/
|
dashboard/build/
|
||||||
dashboard/static/
|
|
||||||
dashboard/node_modules/
|
dashboard/node_modules/
|
||||||
dashboard/.svelte-kit/
|
dashboard/.svelte-kit/
|
||||||
dashboard/package*.json
|
|
||||||
dashboard/svelte.config.*
|
|
||||||
dashboard/vite.config.*
|
|
||||||
dashboard/tsconfig.*
|
|
||||||
docs/
|
docs/
|
||||||
scripts/
|
scripts/
|
||||||
*.md
|
*.md
|
||||||
|
|||||||
16
Dockerfile
16
Dockerfile
@@ -1,3 +1,15 @@
|
|||||||
|
# ── Stage 1: build the SvelteKit dashboard ──
|
||||||
|
FROM node:24-slim AS dashboard-build
|
||||||
|
|
||||||
|
WORKDIR /dashboard
|
||||||
|
|
||||||
|
COPY dashboard/package.json dashboard/package-lock.json ./
|
||||||
|
RUN npm ci
|
||||||
|
|
||||||
|
COPY dashboard/ ./
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
# ── Stage 2: Python runtime ──
|
||||||
FROM python:3.12-slim
|
FROM python:3.12-slim
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
@@ -9,6 +21,10 @@ RUN apt-get update \
|
|||||||
COPY . .
|
COPY . .
|
||||||
RUN pip install --no-cache-dir .
|
RUN pip install --no-cache-dir .
|
||||||
|
|
||||||
|
# dashboard/build is .dockerignored from the host context; copy the freshly
|
||||||
|
# built dashboard from stage 1 so FastAPI can serve it at /app/dashboard/build
|
||||||
|
COPY --from=dashboard-build /dashboard/build ./dashboard/build
|
||||||
|
|
||||||
EXPOSE 8000
|
EXPOSE 8000
|
||||||
|
|
||||||
CMD ["python", "run.py"]
|
CMD ["python", "run.py"]
|
||||||
|
|||||||
Reference in New Issue
Block a user