Piyushdash94's picture
Upload 16 files
df7b737 verified
raw
history blame
655 Bytes
# Base image
FROM python:3.11-slim
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
nginx supervisor && \
rm -rf /var/lib/apt/lists/*
# Set workdir
WORKDIR /workspace
# Install Python dependencies
COPY requirements.txt /workspace/requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Copy application
COPY . /workspace
# Nginx and supervisor configs
COPY nginx.conf /etc/nginx/nginx.conf
COPY supervisord.conf /workspace/supervisord.conf
COPY run.sh /workspace/run.sh
RUN chmod +x /workspace/run.sh
# Expose Space port
EXPOSE 7860
# Start supervisor
CMD ["/workspace/run.sh"]