All the deploying instructions are in the Makefile
- local
- test
- prod
Create the config file named as config.${ENV}.yaml according to the template file and place it in the deploy directory./deploy/, such as:config.local.yaml, config.test.yaml, config.prod.yaml。
- build
% make build
- run
% ./builds/compound server --port 8010 --config ./config/config.yaml
% ./builds/compound worker --port 8020 --config ./config/config.yaml
- Place
config.audit-node1.yaml,config.audit-node2.yaml,config.audit-node3.yamlin the dir./deploy - Build the docker images
% make REPOSITORY_PATH='' docker-build-audit-node1
% make REPOSITORY_PATH='' docker-build-audit-node2
% make REPOSITORY_PATH='' docker-build-audit-node3
-
Config the docker compse file
-
Run docker compose
% docker-compse -f ./deploy/docker/docker-compse.yml up -d
-
Build the docker image(put the config into the docker image):
- Modify the
REPOSITORY_PATHin Makefile - deploy the image to the docker repository, execute
make deploy-%, E.g:make deploy-prod
- Modify the
-
If you want to load the config outside the docker image:
- Modify
Dockerfile, deleteADD config/config.yaml config/config.yaml - Modify
Dockerfile,addVOLUME [ "/var/data/compound" ] - Put the config file to the host directory
/var/data/compound
- Modify
-
health check api
- api:
/hc - worker:
/hc
- api:
- Run api server
// port: custom the api port,default is 80,
// config: custom the config file, default path is ./config/config.yaml
./builds/compound server --port 80 --config ./config/config.yaml
- Run worker server
// config: custom the config file, default path is ./config/config.yaml
./builds/compound worker --config ./config/config.yaml
- Preparing before business running
This project is just a node layer that only including the core business and core apis. And the application layer is
https://github.com/fox-one/compound-app, which contains the user interaction apis and view logics.
All management-related instructions reference documents governance
- Deposit some vote token to the multi-sign wallet with
./builds/compound deposit --asset xxx --amountvote: asset: 965e5c6e-434c-3fa9-b780-c50f43cd955c amount: 0.00000001 - Deposit ctoken to the miltisign wallet with
./builds/compound deposit --asset xxx --amount - Init market data with
./builds/compound market ..... - Add price oracle signer that provide the market price with
./builds/compound add-oracle-signer