Priyam2307/Docket_Diary
0
1# Stage 1: Build Frontend2FROM node:18-alpine as frontend-build3WORKDIR /app/frontend4COPY frontend/package*.json ./5RUN npm ci6COPY frontend ./7RUN npm run build8 9# Stage 2: Production Backend10FROM python:3.10-slim11 12WORKDIR /app13 14# Install dependencies15COPY backend/requirements.txt .16RUN pip install --no-cache-dir -r requirements.txt17 18# Copy backend code19COPY backend/app ./app20 21# Copy built frontend assets22COPY --from=frontend-build /app/frontend/dist ./app/static23 24# Create cases.csv and set permissions for HF Spaces (user 1000)25RUN touch cases.csv && chmod 666 cases.csv26 27# Command to run the application28CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]29 