1
0
mirror of https://github.com/bigchaindb/js-bigchaindb-driver.git synced 2024-11-22 01:36:56 +01:00
This commit is contained in:
Jernej Pregelj 2018-03-29 19:02:46 +02:00
commit bd8fbec5fd
7 changed files with 58 additions and 21 deletions

9
.ci/travis-before-install.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
sudo apt-get update
sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
sudo rm /usr/local/bin/docker-compose
curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
chmod +x docker-compose
sudo mv docker-compose /usr/local/bin

5
.ci/travis-before-script.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
set -e -x
docker-compose up -d bigchaindb

5
.ci/travis-install.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
set -e -x
docker-compose build --no-cache bigchaindb js-bigchaindb-driver

5
.ci/travis_script.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
set -e -x
docker-compose run --rm js-bigchaindb-driver yarn test

View File

@ -5,21 +5,22 @@ services:
language: node_js language: node_js
node_js: 7
cache: cache:
directories: directories:
- node_modules - node_modules
env:
global:
- DOCKER_COMPOSE_VERSION=1.19.0
before_install: before_install:
- docker run -d -p 27017:27017 mongo:3.4 --replSet=bigchain-rs - .ci/travis-before-install
- docker run -d -p 9984:9984
-e BIGCHAINDB_KEYPAIR_PUBLIC=8wHUvvraRo5yEoJAt66UTZaFq9YZ9tFFwcauKPDtjkGw install:
-e BIGCHAINDB_KEYPAIR_PRIVATE=5C5Cknco7YxBRP9AgB1cbUVTL4FAcooxErLygw1DeG2D - .ci/travis-install.sh
-e BIGCHAINDB_DATABASE_BACKEND=mongodb
-e BIGCHAINDB_DATABASE_HOST=172.17.0.1 before_script:
bigchaindb/bigchaindb:master - .ci/travis-before-script.sh
start
- gem install cowsay - gem install cowsay
- npm install -g codecov - npm install -g codecov

View File

@ -0,0 +1,17 @@
# This is a TOML config file.
# For more information, see https://github.com/toml-lang/toml
proxy_app = "tcp://bigchaindb:46658"
moniker = "anonymous"
fast_sync = true
db_backend = "leveldb"
log_level = "state:debug,*:error"
[consensus]
create_empty_blocks = false
[rpc]
laddr = "tcp://0.0.0.0:46657"
[p2p]
laddr = "tcp://0.0.0.0:46656"

View File

@ -10,12 +10,7 @@ services:
depends_on: depends_on:
- mongodb - mongodb
- tendermint - tendermint
build: image: bigchaindb/bigchaindb:master
context: .
dockerfile: ./compose/Dockerfile
args:
branch: master
backend: localmongodb
environment: environment:
BIGCHAINDB_DATABASE_HOST: mongodb BIGCHAINDB_DATABASE_HOST: mongodb
BIGCHAINDB_DATABASE_PORT: 27017 BIGCHAINDB_DATABASE_PORT: 27017
@ -24,15 +19,15 @@ services:
BIGCHAINDB_TENDERMINT_HOST: tendermint BIGCHAINDB_TENDERMINT_HOST: tendermint
BIGCHAINDB_TENDERMINT_PORT: 46657 BIGCHAINDB_TENDERMINT_PORT: 46657
ports: ports:
- "9984" - "9984:9984"
- "9985" - "9985:9985"
- "46658" - "46658"
healthcheck: healthcheck:
test: ["CMD", "bash", "-c", "curl http://bigchaindb:9984 && curl http://tendermint:46657/abci_query"] test: ["CMD", "bash", "-c", "curl http://bigchaindb:9984 && curl http://tendermint:46657/abci_query"]
interval: 3s interval: 3s
timeout: 5s timeout: 5s
retries: 3 retries: 3
command: bigchaindb -l DEBUG start command: -l DEBUG start
tendermint: tendermint:
image: tendermint/tendermint:0.12 image: tendermint/tendermint:0.12
volumes: volumes: