Files
Scoring-System/backend/Dockerfile
爽哒哒 290be5d5be
All checks were successful
Deploy to Server / deploy (push) Successful in 19s
first commit
2026-03-20 23:30:57 +08:00

26 lines
506 B
Docker

# 使用 Python 3.13 slim 镜像作为基础镜像
FROM python:3.13-slim
# 设置环境变量
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# 设置工作目录
WORKDIR /app
# 安装 python 依赖
COPY requirements.txt /app/
RUN pip install --upgrade pip && pip install -r requirements.txt
# 复制项目
COPY . /app/
COPY .env /app/
# 暴露端口
EXPOSE 8876
# Volume for media files
VOLUME ["/app/media"]
# 启动命令
CMD ["gunicorn", "--bind", "0.0.0.0:8876", "config.wsgi:application"]