dc03d71898
- infra/Dockerfile.runner-base: new Ubuntu 24.04 image with Python 3.12 and Node 22 LTS pre-installed, tagged py3.12-node22. Eliminates the ~3-4 min deadsnakes PPA install that ran on every test job. - infra/runner-compose.yml: update ubuntu-latest label to use runner-base:py3.12-node22 instead of node:20-bullseye. - .forgejo/workflows/ci.yml: remove Python 3.12 install steps (now in base image), add actions/cache for pip keyed on pyproject.toml hash, bump node-version 20 → 22. - Dockerfile: bump frontend build stage node:20-alpine → node:22-alpine. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
26 lines
733 B
Docker
26 lines
733 B
Docker
# Stage 1: Build Vue frontend
|
|
FROM node:22-alpine AS build-frontend
|
|
WORKDIR /build
|
|
COPY frontend/package.json frontend/package-lock.json* ./
|
|
RUN npm install -g npm@latest --quiet && npm install
|
|
COPY frontend/ .
|
|
RUN npm run build
|
|
|
|
# Stage 2: Python runtime
|
|
FROM python:3.12-slim AS runtime
|
|
WORKDIR /app
|
|
|
|
COPY pyproject.toml .
|
|
COPY src/ src/
|
|
RUN pip install --no-cache-dir .
|
|
|
|
COPY --from=build-frontend /build/dist/ src/fabledassistant/static/
|
|
COPY alembic.ini .
|
|
COPY alembic/ alembic/
|
|
|
|
# Ensure Python finds the source tree (where static files live) before site-packages
|
|
ENV PYTHONPATH=/app/src
|
|
|
|
EXPOSE 5000
|
|
CMD ["sh", "-c", "alembic upgrade head && hypercorn 'fabledassistant.app:create_app()' --bind 0.0.0.0:5000 --keep-alive 600"]
|