File size: 907 Bytes
d7a8925
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1e0c4ef
 
 
d7a8925
 
 
 
 
 
 
 
 
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
# Build frontend
FROM node:18-alpine as frontend-build

WORKDIR /frontend
COPY podcraft/package*.json ./
RUN npm install
COPY podcraft/ .
RUN npm run build

# Build backend
FROM python:3.11-slim

WORKDIR /app

# Install system dependencies
RUN apt-get update && apt-get install -y \

    build-essential \
    && rm -rf /var/lib/apt/lists/*

# Copy and install Python dependencies
COPY server/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy backend code
COPY server/ .

# Create necessary directories with proper permissions
RUN mkdir -p audio_storage transcripts logs && \

    chmod 777 audio_storage transcripts logs

# Copy frontend build to a static directory
COPY --from=frontend-build /frontend/dist /app/static

# Expose port
EXPOSE 7860

# Start FastAPI application
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]