19 lines
513 B
Docker
19 lines
513 B
Docker
FROM node:20-alpine AS frontend-builder
|
|
WORKDIR /app/frontend
|
|
COPY frontend/package*.json ./
|
|
RUN npm ci
|
|
COPY frontend/ ./
|
|
RUN npm run build
|
|
|
|
FROM python:3.12-slim
|
|
WORKDIR /app
|
|
COPY backend/requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
COPY backend/ .
|
|
COPY --from=frontend-builder /app/frontend/dist /app/dist
|
|
RUN chmod +x entrypoint.sh
|
|
RUN mkdir -p uploads
|
|
EXPOSE 8000
|
|
ENTRYPOINT ["./entrypoint.sh"]
|
|
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|