Add Docker production build and update README
- Multi-stage Dockerfile: builds frontend, packages with Python backend - admin.py serves frontend/dist as StaticFiles in production - docker-entrypoint.sh runs proxy + admin-api, exits cleanly if either dies - .dockerignore excludes .env, venv, tests, node_modules - Split requirements.txt (prod) / requirements-dev.txt (dev+test) - aiofiles added for StaticFiles support - start.sh: port checks before startup, venv auto-activation, trap cleanup - vite.config.js: clearScreen disabled - README rewritten to reflect current architecture Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
c8235ec274
commit
317c7f0340
+22
@@ -0,0 +1,22 @@
|
||||
FROM node:20-alpine AS frontend-builder
|
||||
WORKDIR /app
|
||||
COPY frontend/package*.json frontend/
|
||||
RUN npm ci --prefix frontend
|
||||
COPY frontend/ frontend/
|
||||
RUN npm run build --prefix frontend
|
||||
|
||||
FROM python:3.12-slim
|
||||
WORKDIR /app
|
||||
|
||||
COPY backend/requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY backend/ backend/
|
||||
COPY --from=frontend-builder /app/frontend/dist frontend/dist
|
||||
|
||||
COPY docker-entrypoint.sh .
|
||||
RUN chmod +x docker-entrypoint.sh
|
||||
|
||||
EXPOSE 8000 8001
|
||||
|
||||
CMD ["./docker-entrypoint.sh"]
|
||||
Reference in New Issue
Block a user