Sign inSign up

gachainorg/gachain

By gachainorg

•Updated about 8 years ago

https://gachain.org

Image
0

452

gachainorg/gachain repository overview

本地机器结合Docker搭建Gachain主链

一、先安装好Docker

二、运行PG数据库 docker run -dit --name GAChainDB --restart=always -p 5432:5432 -e POSTGRES_PASSWORD=gachain -e POSTGRES_DB=gachain -e PGDATA=/mnt/gachaindb gachainorg/pgsql:10.3

三、消息服务器 在当前目录生成centrifugo目录 mkdir centrifugo

并生成config.json配置文件,内容如下

{ "secret": "gachain-secret", "web": true, "admin_password": "gachain", "admin_secret": "gachain-secret", "namespaces": [ { "name": "public", "anonymous": true, "publish": true, "watch": true, "presence": true, "join_leave": true, "history_size": 10, "history_lifetime": 30, "recover": true } ] } 例如配置文件路径为:/mnt/centrifugo/config.json

docker run --name Centrifugo -dit --ulimit nofile=65536:65536 -v /mnt/centrifugo:/centrifugo -p 7080:8000 centrifugo/centrifugo:1.8.0 centrifugo -c config.json

四、运行主链程序 docker run -dit --name GAChain -p 7079:7079 -p 7078:7078 --link GAChainDB:db --link Centrifugo:centrifugo -w /go/bin gachainorg/gachain:v2.0

五、进入容器,启动主链程序 docker exec -it GAChain /bin/bash

initDatabaserun.sh - 初始化数据库,生成密钥、启动go-gachain主程序

update.sh - 更新至最新go-gachain主程序

run.sh - 重新启动go-gachain主程序

以上任一脚本操作完毕后需退出容器:exit 或者 command + D

六、拷贝容器中的私钥到当前目录 docker cp GAChain:/go/bin/gachain-data/PrivateKey ./

七、登录客户端 使用步骤六的私钥账号登录访问:https://front.gac.one⁠

八、导入apps文件 向官方联系,获取apps的json文件,进入客户端界面中 依次导入 apps里面的:

1_system.json - 内置系统apps

2_conditions.json - 系统参数apps

3_basic.json - 基础apps

4_lang_res.json - 多语言资源apps

Tag summary

Content type

Image

Digest

Size

248.8 MB

Last updated

about 8 years ago

docker pull gachainorg/gachain