Skip to content

Commit

Permalink
Merge branch 'master' of github.com:meolu/docs
Browse files Browse the repository at this point in the history
  • Loading branch information
meolu committed Jan 12, 2019
2 parents cce87d1 + 2e2f96f commit 01388a1
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 63 deletions.
24 changes: 15 additions & 9 deletions walle-web.io/docs/2/zh-cn/dependency.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,32 @@ walle 2.0 相比 [walle-v1.x](https://walle-web.io/docs/1) 安装更为方便,
* Python 3.5+ 和 Python 2.7+
* ** MySQL 5.6.5以上**,否则会在安装时报错
- 在MySQL 5.6.5版本之前,Automatic Initialization and Updating只适用于TIMESTAMP,而且一张表中,最多允许一个TIMESTAMP字段采用该特性。从MySQL 5.6.5开始,Automatic Initialization and Updating同时适用于TIMESTAMP和DATETIME,且不限制数量。
* 宿主机walle安装所在机器)加入所有目标机器信任(可以免密码登录)
* 将所有*目标主机* 加入 *宿主机*(walle安装所在机器)[ssh免密登录配置](http://walle-web.io/docs/troubleshooting.html)

## 有些前置的基础包可以装下

以下是基于`CentOS 7.6.1810`安装,感谢[warmwinter](https://github.com/warmwinter)issue/pr提供。如果有什么问题找他:)

- 安装的系统自身的mariaDB(未验证)

- 更换阿里云源
```shell
yum install -y mariadb-devel gcc gcc-c++ python-devel
cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/epel-7.repo
yum clean all
yum makecache
```

- 安装的MySQL(未验证)

- 安装EPEL源 RHEL/CentOS 7
```shell
yum install -y mysql-devel gcc gcc-c++ python-devel
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
```

- 安装的Mysql官方源(已验证)
- 安装的系统自身的mariaDB(未验证)
```shell
yum install -y mariadb-devel gcc gcc-c++ python-devel
```

- 安装的MySQL
```shell
yum install -y mysql-community-devel gcc gcc-c++ python-devel
yum install -y mysql-devel gcc gcc-c++ python-devel MySQL-python
```
12 changes: 6 additions & 6 deletions walle-web.io/docs/2/zh-cn/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,13 @@ sh admin.sh migration # Migration


## 9.开启walle 2.0之旅
恭喜你,大功告成!浏览器打开`http://admin.walle-web.io`(因nginx配置域名而定)。登录账号如下,开启你的walle 2.0之旅吧:)
恭喜你,大功告成!浏览器打开`http://admin.walle-web.io`(因nginx配置域名而定)。初始登录账号如下,开启你的walle 2.0之旅吧:)
```
超管:[email protected] Walle123
所有者:[email protected] Walle123
负责人:[email protected] Walle123
开发者:[email protected] Walle123
访客:[email protected] Walle123
超管:[email protected] \ Walle123
所有者:[email protected] \ Walle123
负责人:[email protected] \ Walle123
开发者:[email protected] \ Walle123
访客:[email protected] \ Walle123
```

## 其它
Expand Down
100 changes: 52 additions & 48 deletions walle-web.io/docs/2/zh-cn/installation_docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,73 +54,77 @@ pip install docker-compose -i https://mirrors.aliyun.com/pypi/simple/


## Prepare Before Deploy

修改settings_prod.py
```python
# walle/config/settings_prod.py:17
class ProdConfig(Config):
"""Production configuration."""

# .....
# .....

# todo 数据库设置
SQLALCHEMY_DATABASE_URI = 'mysql://user:password@localhost/walle'

```

修改docker-compose.yml
vim docker-compose.yml
```yaml
version: "3.6"

version: '3.7'
services:

mysql:
image: mysql:5.7
web:
image: alenx/walle-web:2.0
container_name: walle-nginx
hostname: nginx-web
ports:
- 0.0.0.0:3306:3306
expose:
- 3306
environment:
# todo 数据库root密码,这个如果需要修改,需要和 walle/config/settings_prod.py 中数据库密码保持一致
MYSQL_ROOT_PASSWORD: walle
MYSQL_DATABASE: walle
volumes:
- ${HOME}/.walle/mysql:/var/lib/mysql
# 如果宿主机80端口被占用,可自行修改为其他port(>=1024)
# 0.0.0.0:要绑定的宿主机端口:docker容器内端口80
- "80:80"
links:
- python
depends_on:
- python
networks:
- walle-net
restart: always

web:
build: ./
links:
- mysql
python:
# 默认使用alenx/walle-python:2.0
# maven工程使用alenx/walle-java:2.0; maven:3.6.0, jdk:1.8.0_181
image: alenx/walle-python:2.0
# image: alenx/walle-java:2.0
container_name: walle-python
hostname: walle-python
volumes:
- /tmp/walle/codebase/:/tmp/walle/codebase/
- /tmp/walle/logs/:/opt/walle-web/logs/
- /root/.ssh:/root/.ssh/
command: bash -c "cd /opt/walle-web/ && /bin/bash admin.sh migration && python waller.py"
expose:
- 5000
environment:
- WALLE_SECRET="guess me out"
- "5000"
links:
- db
depends_on:
- db
networks:
- walle-net
restart: always

gateway:
image: nginx
links:
- mysql
- web
db:
image: mysql
container_name: walle-mysql
hostname: walle-mysql
ports:
# 如果宿主机80端口被占用,可自行修改为其他port(>=1024)
# 0.0.0.0:要绑定的宿主机端口:docker容器内端口80
- 0.0.0.0:80:80
- "3306:3306"
expose:
- "3306"
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_ROOT_PASSWORD: walle
MYSQL_DATABASE: walle
volumes:
- ./fe/:/data/web/:ro
- ./gateway/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
- /data/walle/mysql:/var/lib/mysql
networks:
- walle-net
restart: always

networks:
walle-net:
driver: bridge
```
## Start
- 一键启动(快速体验)
```bash
docker-compose build && docker-compose up -d && docker-compose logs -f
docker-compose up -d && docker-compose logs -f
# 打开浏览器localhost:80
```

Expand Down

0 comments on commit 01388a1

Please sign in to comment.