-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (29 loc) · 1.15 KB
/
Dockerfile
File metadata and controls
40 lines (29 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
FROM node:20-slim AS frontend-builder
WORKDIR /app
ARG PUBLIC_API_URL="/api"
ARG PUBLIC_BASE_PATH=""
ENV PUBLIC_API_URL=$PUBLIC_API_URL
ENV PUBLIC_BASE_PATH=$PUBLIC_BASE_PATH
COPY frontend/package*.json ./
RUN npm install
COPY frontend/ .
RUN npm run build
# ── Python Runtime ──────────────────────────────────────────────────────────
FROM python:3.11-slim
WORKDIR /app
# Install system deps: curl for healthchecks, ffmpeg kept for future use
RUN apt-get update \
&& apt-get install -y --no-install-recommends curl bash ffmpeg \
&& rm -rf /var/lib/apt/lists/*
# Python dependencies
COPY backend/requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r /app/requirements.txt
# Backend application
COPY backend/app /app/app
COPY backend/alembic.ini /app/alembic.ini
COPY backend/alembic /app/alembic
# Frontend static build
COPY --from=frontend-builder /app/build /app/frontend/dist
ENV STATIC_DIR=/app/frontend/dist
EXPOSE 8000
CMD ["sh", "-c", "alembic upgrade head && uvicorn app.main:app --host 0.0.0.0 --port 8000"]