docker使用笔记
FROM hub.c..com/public/ubuntu:16.04-tools #源镜像
MAINTAINER adam.ding , dxf813@.com COPY requirements.txt /tmp/ #拷贝python需要安装文件
RUN apt-get update && apt-get -y install python3-pip libmysqlclient-dev python3-dev #python3-pip网易源没有
RUN echo "deb http://mirrors.163.com/ubuntu/ precise main restricted universe multiverse" > /etc/apt/sources.list
RUN apt-get update && apt-get install -y nginx redis-server git #下载一些基础服务
RUN mkdir /root/.pip #home目录
COPY pip.conf /root/.pip #拷贝更改的源配置文件
RUN pip3 install --upgrade pip
RUN pip3 install matplotlib #此处不能放入requirement 必须分别安装
RUN pip3 install numpy
COPY nginx-start.conf /etc/supervisor/conf.d #拷贝nginx配置文件
RUN pip3 install pandas==0.17.
RUN pip3 install zipline==1.0.
COPY uwsgi.ini /usr/local/etc/#拷贝uwsgi配置文件
RUN pip3 install uwsgi
COPY vue-dist /usr/local/src/dzh/#将打包好的vue项目文件夹拷贝到指定目录
RUN pip3 install --requirement /tmp/requirements.txt
RUN mkdir /usr/local/src/dzh
WORKDIR /usr/local/src/dzh #切换到目录
RUN git clone https://username:pad@xx.com/xx.git
WORKDIR /usr/local/src/dzh/squant_tools
RUN python3 setup.py build_ext --inplace#安装系统
WORKDIR /etc/nginx/sites-enabled/
RUN mv default default.bb #将默认读取配置文件改名
COPY nginx.conf .
WORKDIR /usr/local/src/dzh/simple_login
RUN python3 setup.py install
COPY squant_tools.conf /etc/supervisor/conf.d
CMD supervisord /etc/supervisor/supervisord.conf
3,部分其他文件的配置
uwsgi.ini内容:
[uwsgi]
http-socket = :
plugin = python3
wsgi-file = /usr/local/src/dzh/squant_tools/quant/wsgi.py
chdir= /usr/local/src/dzh/squant_tools
module = quant.wsgi
processes =
master=True
vacuum=True 使用supervisor启动以下进程
squant_tools.conf内容:
[program:squant_tools]
command = uwsgi /usr/local/etc/uwsgi.ini
stopsignal=KILL
autostart=true
autorestart=true
stdout_logfile=/usr/local/etc/supervisor_stdout.log
stderr_logfile=/usr/local/etc/supervisor_stderr.log
redirect_stderr=true nginx-start.conf内容:
[program:nginx]
command = service nginx start
process_name=%(program_name)s
numprocs= ; 启动几个进程
autostart=true ; 随着supervisord的启动而启动
autorestart=true ; 自动重启。。当然要选上了
startretries= ; 启动失败时的最多重试次数
stopsignal=KILL ; 用来杀死进程的信号
stopwaitsecs= ; 发送SIGKILL前的等待时间
redirect_stderr=true ; 重定向stderr到stdout requirements.txt内容:
django
mysqlclient
psycopg2
cython
pymssql
celery
django-cors-headers
click
cn-stock-holidays
redis
zipline_cn_databundle
docker使用笔记的更多相关文章
- Docker学习笔记 — 配置国内免费registry mirror
Docker学习笔记 — 配置国内免费registry mirror Docker学习笔记 — 配置国内免费registry mirror
- docker学习笔记1 -- 安装和配置
技术资料 docker中文官网:http://www.docker.org.cn/ 中文入门课程:http://www.docker.org.cn/book/docker.html docker学习笔 ...
- Docker学习笔记之一,搭建一个JAVA Tomcat运行环境
Docker学习笔记之一,搭建一个JAVA Tomcat运行环境 前言 Docker旨在提供一种应用程序的自动化部署解决方案,在 Linux 系统上迅速创建一个容器(轻量级虚拟机)并部署和运行应用程序 ...
- docker~学习笔记索引
回到占占推荐博客索引 使用docker也有段时间了,写了不少文章与总结,下面把它整理个目录出来,方便大家去学习与检索! docker~学习笔记索引 docker~linux下的部署和基本命令(2017 ...
- Docker学习笔记 - Docker容器内部署redis
Docker学习笔记(2-4)Docker应用实验-redist server 和client的安装使用 一.获取redis容器(含客户端和服务端) 二.创建服务端容器 1.在终端A中运行redis- ...
- docker学习笔记(一)—— ubuntu16.04下安装docker
docker学习笔记(一)—— ubuntu16.04下安装docker 原创 2018年03月01日 14:53:00 标签: docker / ubuntu 1682 本文开发环境为Ubuntu ...
- Docker入门笔记
Docker入门笔记 随笔记录初学Docker遇到的问题, 以免下次再犯. 本机系统Ubuntu18.04 安装 Docker有2个版本 Community Edition (CE) 社区版(免费) ...
- Docker入门笔记(1)
Docker入门笔记(1) 1.安装Docker yum -y install docker-ce 2.查看Docker版本 [root@localhost ~]# docker -v Docker ...
- Docker学习笔记总结
Docker学习笔记 https://yeasy.gitbooks.io/docker_practice/content/ 一 环境搭建 Ubuntu安装 .添加软件源的GPG密钥 curl -f ...
- docker学习笔记二:常用命令
docker学习笔记二:常用命令 查看docker常用命令 docker --help 返回结果如下: 其中常用的命令如下: 1.image相关操作 展示所有的image: 删除image: rmi ...
随机推荐
- hadoop启动namenode日志报这个错,首先说怎么看日志
hadoop启动namenode日志报这个错,首先说怎么看日志, 启动namenode会有这个,ubuntu: starting namenode, logging to /home/xiaoye/h ...
- vs2017 .net core 项目调试浏览器网页闪退Bug
from:https://blog.csdn.net/qq_36330228/article/details/82152187 vs更新2017最新版本后,项目调试浏览器莫名其妙出现闪退,每次都TMD ...
- 【转】2、Jenkins构建完成自动发送邮件
1.开通163邮箱的授权码服务,和SMTP服务.百度找教程.2.安装 Email Extension Plugin 插件,已安装或版本自带可跳过此步骤.3.进入系统管理–系统设置首先配置 Jenkin ...
- maven clean或package报错
[ERROR] Failed to execute goal on project jeesns-service: Could not resolve dependencies for project ...
- IAR Embedded Workbench for ARM 8.22.1 基础使用教程
面向尚未熟悉且初次使用该软件的新手(比如我...) 1.建立新工作区 File-->>New Workspace 2.建立新项目 1) Project-->>Create Ne ...
- you've successfully authenticated, but Gitee.com does not provide she access.
如果都是正常的生成ssh的操作,还是会报这个错误,那么就是.... 你没更改文件夹的权限,这个坑跳了很久(汗...) sudo chmod 777 -r 文件夹
- Hadoop 安全模式safemode
启动Hdfs 系统的时候,其中的一个阶段“”安全模式 发生阶段:NameNode启动中,已经读取了fsimage 并且生成了edits 文件,在等待dataNode 向nameNode 发送block ...
- Fetch和ajax的比较和区别
传统 Ajax 已死,Fetch 永生 Ajax 不会死,传统 Ajax 指的是 XMLHttpRequest(XHR),未来现在已被 Fetch 替代. 最近把阿里一个千万级 PV 的数据产品全 ...
- json传实体到后台接受
转自https://www.cnblogs.com/threadj/p/10535760.html 我用第一种是没问题的,第二种还不行,再研究一下 1.json参数为json字符串 var data ...
- BP神经网络(原理及MATLAB实现)
人工神经网络概述: 人工神经元模型: 神经网络的分类: 按照连接方式,可以分为:前向神经网络 vs. 反馈(递归)神经网络: 按照学习方式,可以分为:有导师学习神经网络 vs. 无导师学习神经网络: ...