mirror of
https://github.com/R0m1k3/Reviflow.git
synced 2026-10-19 21:18:13 +02:00
Sauvegarde de l'état (réparation)
This commit is contained in:
commit
7c04fffe77
434 files changed
+83923
No files matched your search
+38
@@ -0,0 +1,38 @@
|
||||
# Stage 1: Build Frontend
|
||||
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: Setup Backend & Runtime
|
||||
FROM python:3.11-slim
|
||||
WORKDIR /app
|
||||
|
||||
# Install System Dependencies (Minimal)
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
curl \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install Poetry
|
||||
RUN curl -sSL https://install.python-poetry.org | python3 -
|
||||
ENV PATH="/root/.local/bin:$PATH"
|
||||
ENV POETRY_VIRTUALENVS_CREATE=false
|
||||
|
||||
# Copy Backend Requirements
|
||||
COPY backend/pyproject.toml backend/poetry.lock* ./backend/
|
||||
WORKDIR /app/backend
|
||||
RUN poetry install --no-root --without dev
|
||||
|
||||
# Copy Backend Code
|
||||
COPY backend/ ./
|
||||
|
||||
# Copy Built Frontend from Stage 1 to Backend Static Folder
|
||||
COPY --from=frontend-build /app/backend/static /app/backend/static
|
||||
|
||||
# Expose Port
|
||||
EXPOSE 8000
|
||||
|
||||
# Run Uvicorn
|
||||
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
Reference in new issue
Block a user