refactor: 统一构建产物输出目录

This commit is contained in:
2026-05-20 10:59:16 +08:00
parent 6e0abac30b
commit fcac708814
13 changed files with 181 additions and 133 deletions
+44
View File
@@ -0,0 +1,44 @@
# CapacityReport Dockerfile
# The frontend is built in a Node stage and served by the FastAPI runtime.
FROM node:22-slim AS frontend-build
WORKDIR /frontend
COPY frontend/package*.json ./
RUN npm ci
COPY frontend/ ./
RUN npm run build
FROM python:3.13.11-slim
LABEL maintainer="CapacityReport"
LABEL description="CapacityReport processing service"
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
libmariadb-dev \
curl \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
RUN mkdir -p /var/log/supervisor /var/run /app/cache
COPY app ./app
COPY Configure.json ReportScript.sql start.sh supervisord.conf ./
COPY --from=frontend-build /frontend/dist /app/frontend/dist
RUN chmod +x /app/start.sh 2>/dev/null || true
EXPOSE 9081
HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \
CMD curl -f http://localhost:9081/health || exit 1
CMD ["supervisord", "-c", "/app/supervisord.conf"]