Spaces:
Sleeping

CORTEXA2 / Dockerfile
Darshee245's picture
Update Dockerfile
f6af619 verified
Raw History Blame Contribute Delete
647 Bytes
FROM python:3.11-slim
WORKDIR /app
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Install Nginx
RUN apt-get update && \
apt-get install -y nginx && \
rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY backend/requirements.txt ./requirements.txt
RUN pip install --no-cache-dir --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
# Copy backend
COPY backend/ ./
# Copy frontend to Nginx web root
COPY frontend/ /usr/share/nginx/html/
# Copy Nginx configuration
COPY nginx.conf /etc/nginx/nginx.conf
# Copy startup script
COPY start.sh /start.sh
RUN chmod +x /start.sh
EXPOSE 7860
CMD ["/start.sh"]