部署yearning1.3

1.安装docker-compose

yum -y install epel-release python-pip
pip install --upgrade pip
pip install --upgrade backports.ssl_match_hostname
pip install docker-compose
docker-compose -version

安装docker-compose

2. 下载yearning源码

mkdir /python && cd /python
git clone https://github.com/cookieY/Yearning.git

3. 安装yearning1.3

service docker start
cd /python/Yearning/install/yearning-docker-compose
vim docker-compose.yml // 8080:80 => 80:80
docker-compose up -d

// 要先在创建好相应的数据库表等
docker rm -f yearning-docker-compose_yearning_1
docker rm -f yearning-docker-compose_yearning_1 

docker run -d 
 -e HOST=192.168.154.132 
 -e MYSQL_ADDR=192.168.154.132 
 -e MYSQL_USER=root 
 -e MYSQL_PASSWORD=yearning 
 --restart=always 
 --name yearning 
 -p80:80 
 -p8000:8000 registry.cn-hangzhou.aliyuncs.com/cookie/yearning:v1.3.1

4. inception

// 因为db和nginx+python放在2个容器里面,用127.0.0.1是访问不道到(nginx+python的容器没有mysql),所以inception放在数据库所在服务器
tar xvf inception.tar -C /python/
nohup /python/inception/bin/Inception --defaults-file=/python/inception/bin/inc.cnf &

5.相关资料

  1. 官方文档
  2. github
  3. MySQL审核工具Inception推荐
原文地址:https://www.cnblogs.com/gelu/p/9789905.html