- test_simulations_patch: remove false dict return annotation on _patch helper - simulation_workflow: validate executed_at upfront before any setattr (prevents partial mutation on bad payload) - api/simulations: remove unreachable role check in update_simulation (all valid roles are admin/redteam/soc) - Dockerfile: remove redundant COPY backend/data/ (already covered by COPY backend/) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
31 lines
792 B
Docker
31 lines
792 B
Docker
# Stage 1: build front
|
|
FROM node:20-alpine AS frontend-build
|
|
WORKDIR /app/frontend
|
|
COPY frontend/package*.json ./
|
|
RUN npm ci
|
|
COPY frontend/ ./
|
|
RUN npm run build
|
|
|
|
# Stage 2: python runtime
|
|
FROM python:3.12-slim
|
|
WORKDIR /app
|
|
COPY backend/requirements.txt ./backend/
|
|
RUN pip install --no-cache-dir -r backend/requirements.txt
|
|
COPY backend/ ./backend/
|
|
COPY --from=frontend-build /app/frontend/dist ./backend/app/static
|
|
|
|
ENV FLASK_APP=backend.app:create_app
|
|
ENV PYTHONUNBUFFERED=1
|
|
ENV PYTHONPATH=/app
|
|
# Variables surchargeables au `docker run` :
|
|
ENV MIMIC_PORT=5000
|
|
ENV MIMIC_DB_PATH=/data/mimic.sqlite
|
|
|
|
VOLUME ["/data"]
|
|
EXPOSE 5000
|
|
|
|
# Entrypoint : applique les migrations Alembic puis lance Flask
|
|
COPY docker/entrypoint.sh /entrypoint.sh
|
|
RUN chmod +x /entrypoint.sh
|
|
ENTRYPOINT ["/entrypoint.sh"]
|