File size: 1,350 Bytes
ec17af3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
41
FROM node:20-bookworm-slim

ENV DEBIAN_FRONTEND=noninteractive \
    PYTHONUNBUFFERED=1 \
    HOME=/app/data/home \
    INTERNAL_API_URL="http://127.0.0.1:8000" \
    ALLOW_FRAME_EMBEDDING="true" \
    PORT=7860

RUN apt-get update && apt-get install -y --no-install-recommends \
    python3 \
    python3-pip \
    ffmpeg \
    ca-certificates \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /app

# Install Python backend + cloud DB/S3 dependencies
RUN pip3 install --no-cache-dir --break-system-packages \
    fastapi "uvicorn[standard]" sqlalchemy psycopg2-binary pydantic pydantic-settings \
    python-multipart "python-jose[cryptography]" "passlib[bcrypt]" "bcrypt<4.1" \
    httpx email-validator faster-whisper arq reportlab boto3

# Install Node.js workspace dependencies
COPY package.json package-lock.json tsconfig.base.json ./
COPY packages/shared/package.json ./packages/shared/package.json
COPY apps/web/package.json ./apps/web/package.json
RUN npm ci --no-audit --no-fund

# Copy application source and build Next.js production bundle
COPY . .
RUN chmod +x /app/infra/scripts/start_cloud.sh /app/infra/scripts/run_presenter_coach.sh \
    && mkdir -p /app/data/storage /app/data/home \
    && npm --workspace apps/web run build \
    && chmod -R 777 /app/data /app/apps/web/.next

EXPOSE 7860

CMD ["/app/infra/scripts/start_cloud.sh"]