[关闭]
@bergus 2016-03-21T12:56:07.000000Z 字数 1072 阅读 1386

Docker持续交付说明

docker


CI

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

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

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

数据库重置:

pgsql 免密码配置

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

重置脚本执行:

  1. cd /go/src/github.com/wothing/17mei/sql
  2. psql -h prod-postgres.prod -U postgres -d wothing -f user.sql
  3. psql -h prod-postgres.prod -U postgres -d wothing -f user_example.sql
  4. psql -h prod-postgres.prod -U postgres -d wothing -f activity.sql
  5. psql -h prod-postgres.prod -U postgres -d wothing -f activity_example.sql
  6. psql -h prod-postgres.prod -U postgres -d wothing -f diary.sql
  7. psql -h prod-postgres.prod -U postgres -d wothing -f diary_samples.sql
  8. psql -h prod-postgres.prod -U postgres -d wothing -f other.sql

Generate Mei id

  1. /go/src/github.com/wothing/17mei/user/meigen
  2. 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

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注