1 Star 0 Fork 0

weberChen/乌鲁木齐工程管理_服务端

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Dockerfile 1.31 KB
一键复制 编辑 原始数据 按行查看 历史
weberChen 提交于 2024-04-21 15:16 . 4月21日修改。。。
# Base images 基础镜像
FROM wupeiqi/centos76py39:1.0
#ENV LANG C.UTF-8
#ENV LC_ALL C.UTF-8
#MAINTAINER 维护者信息
MAINTAINER 690453996@qq.com
RUN pip3.9 config set global.index-url https://mirrors.aliyun.com/pypi/simple
# git
RUN yum install git -y
RUN git config --global user.name "weberChen"
RUN git config --global user.email "60453996@qq.com"
# git拉代码
WORKDIR /data/
# 后端代码
RUN git clone https://gitee.com/weberchen/engineer_project_serve.git
# 虚拟环境
WORKDIR /data/engineer_project_serve/
RUN pip3.9 install virtualenv
RUN virtualenv /envs/engineer_project_serve --python=python3.9
RUN /envs/engineer_project_serve/bin/pip3.9 install -r requirements.txt
# 收集静态资源 /data/allstatic/
WORKDIR /data/engineer_project_serve/
RUN /envs/engineer_project_serve/bin/python manage.py collectstatic
# 安装uwsgi
RUN /envs/engineer_project_serve/bin/pip3.9 install uwsgi
# 安装nginx
WORKDIR /data/engineer_project_serve/
RUN rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
RUN yum install nginx -y
# 易错点
RUN cp blog.conf /etc/nginx/myblog.conf
# 运行项目
WORKDIR /data/engineer_project_serve
# CMD ["/envs/blog/bin/uwsgi","--ini","uwsgi.ini"]
# CMD ["nginx","-c","/etc/nginx/myblog.conf","-g","daemon off;"]
CMD ["/bin/sh","run.sh"]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/weberchen/engineer_project_serve.git
git@gitee.com:weberchen/engineer_project_serve.git
weberchen
engineer_project_serve
乌鲁木齐工程管理_服务端
master

搜索帮助