midterm / Dockerfile
Nagesh Muralidhar
midterm-submission
1e0c4ef
raw
history blame
907 Bytes
# 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"]