rtc_backend/Dockerfile
repair-agent 47be0781ac
All checks were successful
Build and Deploy Backend / build-and-deploy (push) Successful in 2m59s
fix: auto repair bugs #23
2026-02-24 14:53:05 +08:00

32 lines
914 B
Docker

# Use an official Python runtime as a parent image
FROM python:3.12-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Set work directory
WORKDIR /app
# Install system dependencies
RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list.d/debian.sources && \
apt-get update && apt-get install -y \
gcc \
default-libmysqlclient-dev \
pkg-config \
&& rm -rf /var/lib/apt/lists/*
# Install python dependencies
COPY requirements.txt /app/
RUN pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/ && \
pip install --upgrade pip && pip install -r requirements.txt && pip install gunicorn
# Copy project
COPY . /app/
# Expose port
EXPOSE 8000
# Run entrypoint
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "--workers", "2", "--timeout", "120", "--access-logfile", "-", "--error-logfile", "-", "config.wsgi:application"]