Skip to content

Commit

Permalink
API wait 15s for chain (#55)
Browse files Browse the repository at this point in the history
* api depends on chain

* fix error

* fix depends on error

* wait 15 s for chain
  • Loading branch information
LowEntropyBody committed Aug 31, 2020
1 parent d019043 commit bd3738f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 20 deletions.
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

0 comments on commit bd3738f

Please sign in to comment.