1 Star 2 Fork 2

cuiliang/drf-template

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile 731 Bytes
一键复制 编辑 原始数据 按行查看 历史
# 项目dockerfile镜像文件
FROM python:3.11
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone && pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
ADD . /opt/DRF/
RUN pip install -r /opt/DRF/requirements.txt
WORKDIR /opt/DRF/
EXPOSE 8000
# 开发环境
#CMD ["python","manage.py","runserver","0.0.0.0:8000"]
# 测试环境
# ENV PROJECT_ENV prod
#CMD ["PROJECT_ENV=prod","python","manage.py","runserver","0.0.0.0:8000"]
# 生产环境(无定时任务)
#ENV PROJECT_ENV prod
#CMD ["gunicorn", "DRF.asgi:application", "-k", "uvicorn.workers.UvicornWorker","-c","gunicorn_conf.py"]
# 生产环境(启用定时任务)
ENV PROJECT_ENV prod
CMD ["sh","start.sh"]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/cuiliang0302/drf_template.git
git@gitee.com:cuiliang0302/drf_template.git
cuiliang0302
drf_template
drf-template
master

搜索帮助