Files
meeting-room/backend/Dockerfile

22 lines
391 B
Docker
Raw Normal View History

FROM python:3.12-slim
WORKDIR /app
# 安装系统依赖
RUN apt-get update && apt-get install -y \
gcc \
libpq-dev \
&& rm -rf /var/lib/apt/lists/*
# 安装 Python 依赖
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# 复制代码
COPY . .
# 暴露端口
EXPOSE 8000
CMD ["gunicorn", "meeting_room.wsgi:application", "--bind", "0.0.0.0:8000"]