Skip to content

Commit

Permalink
update config and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
qywang2012 committed Jun 20, 2019
1 parent 2f0aa45 commit 66e163b
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 1 deletion.
19 changes: 19 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
53 changes: 52 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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*:
Expand All @@ -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:**
Expand All @@ -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

Expand Down

0 comments on commit 66e163b

Please sign in to comment.