CI

目前ci是通过golang环境做了一个builder Container 方法:

docker clone https://github.com/wothing/17mei.git
cd 17mei
make
cd gateway/test
go test ......  -dh prod-postgres.prod -du postgres -dpwd wothing -dn wothing -api http://prod-gw.prod:3001/v1

注意最后test命令: 需要指定数据库位置以及gateway的位置

数据库重置:

pgsql 免密码配置

echo "prod-postgres.prod:5432:wothing:postgres:wothing"  > ~/.pgpass
chmod 0600 ~/.pgpass

重置脚本执行:

cd /go/src/github.com/wothing/17mei/sql
psql -h prod-postgres.prod -U postgres  -d wothing -f user.sql
psql -h prod-postgres.prod -U postgres  -d wothing -f user_example.sql
psql -h prod-postgres.prod -U postgres  -d wothing -f activity.sql
psql -h prod-postgres.prod -U postgres  -d wothing -f activity_example.sql
psql -h prod-postgres.prod -U postgres  -d wothing -f diary.sql
psql -h prod-postgres.prod -U postgres  -d wothing -f diary_samples.sql
psql -h prod-postgres.prod -U postgres  -d wothing -f other.sql

Generate Mei id

/go/src/github.com/wothing/17mei/user/meigen
go run meigen.go  -dh prod-postgres.prod -du postgres -dpwd wothing -dn wothing

看到用了多少毫秒输出之后马上停下来大概就能有一千个了。

更新服务的容器运行

docker restart prod-diary prod-verification prod-activity prod-push prod-other prod-mediastore prod-gw prod-user