-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[dag inspector] Add README.md for local environment
- Loading branch information
Showing
2 changed files
with
64 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,57 @@ | ||
# 如何构建本地环境 | ||
# How to build local environment | ||
|
||
## 1. 安装 Docker | ||
## 2. 安装 Docker Compose | ||
## 3. 运行以下命令 | ||
## 1. Install "Docker" and "Docker Compose" | ||
## 2. Run the command to start the database and components | ||
```bash | ||
docker-compose up | ||
``` | ||
## 4. 访问 http://localhost:8080 | ||
## 3. Start starcoin-index project | ||
|
||
### Config the startup environment variable | ||
```dotenv | ||
HOSTS=localhost | ||
NETWORK=halley # select which network to scan | ||
BG_TASK_JOBS=dag_inspector | ||
TXN_OFFSET=0 | ||
BULK_SIZE=100 | ||
STARCOIN_ES_PWD= | ||
STARCOIN_ES_URL=localhost | ||
STARCOIN_ES_PROTOCOL=http | ||
STARCOIN_ES_PORT=9200 | ||
STARCOIN_ES_USER= | ||
SWAP_API_URL=https://swap-api.starswap.xyz | ||
SWAP_CONTRACT_ADDR=0x8c109349c6bd91411d6bc962e080c4a3 | ||
DS_URL=jdbc:postgresql://localhost/starcoin | ||
DB_SCHEMA=halley | ||
DB_USER_NAME=starcoin | ||
DB_PWD=starcoin | ||
PROGRAM_ARGS= | ||
# auto_repair 9411700 | ||
``` | ||
|
||
### Configuration Elasticsearch template | ||
[IMPORTANT!!] Make sure your template has added to Elastic search service before add data, including component template and index template to ES. | ||
Following file: [[es_pipeline.scripts](..%2Fkube%2Fmappings%2Fes_pipeline.scripts)] | ||
|
||
1. Open the 'Kibana' site has been started in the docker-compose environment, usually the url is http://localhost:5601 | ||
2. Navigate to 'Dev Tools' | ||
3. Follow the instructions in the file of giving above to add the template to ES | ||
|
||
## 4. Start starcoin-scan-api project | ||
|
||
### Config the startup enviroment variable | ||
```dotenv | ||
STARCOIN_ES_URL=localhost | ||
STARCOIN_ES_PROTOCOL=http | ||
STARCOIN_ES_PORT=9200 | ||
STARCOIN_ES_USER= | ||
STARCOIN_ES_INDEX_VERSION= | ||
STARCOIN_ES_PWD= | ||
MAIN_DS_URL=jdbc:postgresql://localhost/starcoin?currentSchema=main | ||
BARNARD_DS_URL=jdbc:postgresql://localhost/starcoin?currentSchema=barnard | ||
HALLEY_DS_URL=jdbc:postgresql://localhost/starcoin?currentSchema=halley | ||
DS_URL=jdbc:postgresql://localhost/starcoin | ||
STARCOIN_USER_DS_URL="jdbc:postgresql://localhost/starcoin?currentSchema=starcoin_user" | ||
DB_USER_NAME=starcoin | ||
DB_PWD=starcoin | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters