Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API wait 15s for chain #55

Merged
merged 4 commits into from
Aug 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 7 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,22 @@ Official crust node service for running crust protocol.

## Install dependencies

### Install lib
### Install crust service
```shell
sudo apt install -y git jq curl wget build-essential kmod
curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
sudo apt install docker-compose
sudo apt install -y linux-headers-`uname -r`
```

### Install sgx driver
```shell
sudo ./scripts/install_sgx_driver.sh
sudo ./install.sh
```

### Generate application configuration

#### Modify config.yaml
You need to modify config.yaml

### Run the config gen script
Run ```sudo ./scripts/gen_config.sh``` Configrations and docker compose will generated in the build directory.
```shell
sudo vim /opt/crust/crust-node/config.yaml
```

### Run docker
### Run crust service

```shell
cd build
sudo docker-compose up crust
sudo docker-compose up crust-api
sudo docker-compose up crust-sworker
sudo docker-compose up karst # if your want to start karst, please make sure fastdfs is running in your computer
sudo systemctl start crust
```

## License
Expand Down
1 change: 1 addition & 0 deletions generator/config-gen/api-config.gen.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ async function genApiComposeConfig(config) {
environment: {
ARGS: args,
},
depends_on: ['crust']
}
}

Expand Down
2 changes: 2 additions & 0 deletions scripts/crust.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ start()
fi
fi

docker-compose -f $builddir/docker-compose.yaml up -d crust
sleep 15
docker-compose -f $builddir/docker-compose.yaml up -d
}

Expand Down