rtc_backend/Dockerfile
zyc ded5be6a05
Some checks failed
Build and Deploy Backend / build-and-deploy (push) Failing after 6m4s
add build test
2026-01-29 15:16:20 +08:00

30 lines
651 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 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 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", "config.wsgi:application"]