From 66e163baff556b2d5767716c14d9d2525cca2b33 Mon Sep 17 00:00:00 2001 From: Larry Wang Date: Thu, 20 Jun 2019 17:01:22 +0800 Subject: [PATCH] update config and readme --- .eslintrc.json | 19 ++++++++++++++++++ README.md | 53 +++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 .eslintrc.json diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 000000000..f82726ea8 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,19 @@ +{ + "env": { + "browser": true, + "commonjs": true, + "es6": true, + "node": true + }, + "extends": "eslint:recommended", + "globals": { + "Atomics": "readonly", + "SharedArrayBuffer": "readonly" + }, + "parserOptions": { + "ecmaVersion": 2018 + }, + "rules": { + "no-console": "off" + } +} \ No newline at end of file diff --git a/README.md b/README.md index 54a240164..908942311 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,11 @@ Nebulas execution need NVM and NBRE two dependent libraries. We provide stable v ```bash cd github.com/nebulasio/go-nebulas + +OS X: +./install-native-libs.sh + +Linux: source install-native-libs.sh ``` ##### *Note*: @@ -59,6 +64,10 @@ The dependency libraries are not installed in the system directory, and there ar * *OS X*: * In the user's root directory to create ` lib ` folder, system to load the library path can read this path, ensure that the root directory of the current folder does not exist. All of these operations in ` install-native-libs.sh ` already processing.(`DYLD_LIBRARY_PATH` is not possible unless System Integrity Protection (SIP) is disabled) + ``` + ./install-native-libs.sh + ``` + * *Linux - Ubuntu* * `install-native-libs.sh` export `LD_LIBRARY_PATH` for native libs. * Because the CPU instruction set may vary from machine to machine, the pre-compiled nbre may not be available. **If the library you installed with the script is not available (it does not start after compilation), compile the nbre yourself:** @@ -85,7 +94,49 @@ The dependency libraries are not installed in the system directory, and there ar #### Build the neb binary. - * run `make build` + * run command + + ``` + make build + ``` + +## Building from Docker + +Currently docker only supports the running environment hosted by **Ubuntu**. You can specify the config file by modifying the docker-compose environment configuration. + +- default docker compose config(version3): + +``` +version: '3' + +services: + + node: + image: nebulasio/go-nebulas + build: + context: ./docker + ports: + - '8680:8680' + - '8684:8684' + - '8685:8685' + - '8888:8888' + - '8086:8086' + volumes: + - .:/go/src/github.com/nebulasio/go-nebulas + environment: + - REGION=China + - config=mainnet/conf/config.conf + command: bash docker/scripts/neb.bash + +``` + + - install [docker](https://docs.docker.com/install/linux/docker-ce/ubuntu/) and [docker-compose](https://docs.docker.com/compose/install/) + - run docker command + + ``` + sudo docker-compose build + sudo docker-compose up -d + ``` ## Run