30 lines
759 B
Docker
30 lines
759 B
Docker
FROM node:22-alpine AS frontend-build
|
|
|
|
WORKDIR /frontend
|
|
COPY frontend/package.json frontend/package-lock.json ./
|
|
RUN npm ci --no-audit --no-fund
|
|
COPY frontend/ ./
|
|
RUN npm run build
|
|
|
|
FROM python:3.12-slim
|
|
|
|
WORKDIR /app
|
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
PYTHONUNBUFFERED=1 \
|
|
REPOPULSE_DB=/data/repopulse.db \
|
|
REPOPULSE_SCAN_ROOT=/scan \
|
|
REPOPULSE_STATIC_DIR=/app/static
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends git \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY backend/pyproject.toml ./pyproject.toml
|
|
COPY backend/app ./app
|
|
RUN pip install --no-cache-dir .
|
|
COPY --from=frontend-build /frontend/dist ./static
|
|
|
|
VOLUME ["/data", "/scan"]
|
|
EXPOSE 8000
|
|
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|