2020-04-06 11:52:18 +02:00
|
|
|
# Copyright © 2020 Interplanetary Database Association e.V.,
|
|
|
|
# BigchainDB and IPDB software contributors.
|
2018-08-16 12:31:32 +02:00
|
|
|
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
|
|
|
# Code is Apache-2.0 and docs are CC-BY-4.0
|
|
|
|
|
2020-02-20 16:30:37 +01:00
|
|
|
version: '2.2'
|
2016-02-10 19:55:33 +01:00
|
|
|
|
2016-05-13 16:22:40 +02:00
|
|
|
services:
|
2018-03-21 12:42:43 +01:00
|
|
|
# Build: docker-compose build -d bigchaindb
|
|
|
|
# Run: docker-compose run -d bdb
|
|
|
|
mongodb:
|
2018-05-17 15:19:56 +02:00
|
|
|
image: mongo:3.6
|
2016-12-13 11:31:04 +01:00
|
|
|
ports:
|
2018-05-30 15:58:56 +02:00
|
|
|
- "27017:27017"
|
2017-11-15 15:01:07 +01:00
|
|
|
command: mongod
|
2019-02-26 09:57:38 +01:00
|
|
|
restart: always
|
2018-03-21 12:42:43 +01:00
|
|
|
bigchaindb:
|
|
|
|
depends_on:
|
|
|
|
- mongodb
|
|
|
|
- tendermint
|
2016-12-13 11:31:04 +01:00
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
dockerfile: Dockerfile-dev
|
|
|
|
volumes:
|
|
|
|
- ./bigchaindb:/usr/src/app/bigchaindb
|
|
|
|
- ./tests:/usr/src/app/tests
|
|
|
|
- ./docs:/usr/src/app/docs
|
2018-03-22 17:12:39 +01:00
|
|
|
- ./htmlcov:/usr/src/app/htmlcov
|
2016-12-13 11:31:04 +01:00
|
|
|
- ./setup.py:/usr/src/app/setup.py
|
|
|
|
- ./setup.cfg:/usr/src/app/setup.cfg
|
|
|
|
- ./pytest.ini:/usr/src/app/pytest.ini
|
|
|
|
- ./tox.ini:/usr/src/app/tox.ini
|
|
|
|
environment:
|
2017-11-15 15:01:07 +01:00
|
|
|
BIGCHAINDB_DATABASE_BACKEND: localmongodb
|
2018-03-21 12:42:43 +01:00
|
|
|
BIGCHAINDB_DATABASE_HOST: mongodb
|
2016-12-13 11:31:04 +01:00
|
|
|
BIGCHAINDB_DATABASE_PORT: 27017
|
|
|
|
BIGCHAINDB_SERVER_BIND: 0.0.0.0:9984
|
2017-06-28 11:39:50 +02:00
|
|
|
BIGCHAINDB_WSSERVER_HOST: 0.0.0.0
|
2018-04-30 14:43:39 +02:00
|
|
|
BIGCHAINDB_WSSERVER_ADVERTISED_HOST: bigchaindb
|
2018-03-21 12:42:43 +01:00
|
|
|
BIGCHAINDB_TENDERMINT_HOST: tendermint
|
2018-07-10 14:16:02 +02:00
|
|
|
BIGCHAINDB_TENDERMINT_PORT: 26657
|
2016-12-13 11:31:04 +01:00
|
|
|
ports:
|
2018-03-22 17:12:39 +01:00
|
|
|
- "9984:9984"
|
|
|
|
- "9985:9985"
|
2018-07-10 14:16:02 +02:00
|
|
|
- "26658"
|
2018-03-21 12:42:43 +01:00
|
|
|
healthcheck:
|
2018-07-10 14:16:02 +02:00
|
|
|
test: ["CMD", "bash", "-c", "curl http://bigchaindb:9984 && curl http://tendermint:26657/abci_query"]
|
2018-03-21 12:42:43 +01:00
|
|
|
interval: 3s
|
|
|
|
timeout: 5s
|
|
|
|
retries: 3
|
2018-04-30 14:43:39 +02:00
|
|
|
command: '.ci/entrypoint.sh'
|
2019-02-26 09:57:38 +01:00
|
|
|
restart: always
|
2018-03-21 12:42:43 +01:00
|
|
|
tendermint:
|
2019-10-07 16:32:35 +02:00
|
|
|
image: tendermint/tendermint:v0.31.5
|
2018-04-26 11:09:38 +02:00
|
|
|
# volumes:
|
|
|
|
# - ./tmdata:/tendermint
|
2018-03-21 12:42:43 +01:00
|
|
|
entrypoint: ''
|
|
|
|
ports:
|
2018-07-10 14:16:02 +02:00
|
|
|
- "26656:26656"
|
|
|
|
- "26657:26657"
|
|
|
|
command: sh -c "tendermint init && tendermint node --consensus.create_empty_blocks=false --proxy_app=tcp://bigchaindb:26658"
|
2019-02-26 09:57:38 +01:00
|
|
|
restart: always
|
2018-03-21 12:42:43 +01:00
|
|
|
bdb:
|
|
|
|
image: busybox
|
|
|
|
depends_on:
|
|
|
|
bigchaindb:
|
|
|
|
condition: service_healthy
|
|
|
|
|
|
|
|
|
|
|
|
# curl client to check the health of development env
|
|
|
|
curl-client:
|
|
|
|
image: appropriate/curl
|
2018-07-10 14:16:02 +02:00
|
|
|
command: /bin/sh -c "curl -s http://bigchaindb:9984/ > /dev/null && curl -s http://tendermint:26657/ > /dev/null"
|
2018-03-21 12:42:43 +01:00
|
|
|
|
2018-04-30 14:43:39 +02:00
|
|
|
# BigchainDB setup to do acceptance testing with Python
|
|
|
|
python-acceptance:
|
2018-03-21 12:42:43 +01:00
|
|
|
build:
|
|
|
|
context: .
|
2018-04-30 14:43:39 +02:00
|
|
|
dockerfile: ./acceptance/python/Dockerfile
|
|
|
|
volumes:
|
|
|
|
- ./acceptance/python/docs:/docs
|
|
|
|
- ./acceptance/python/src:/src
|
|
|
|
environment:
|
|
|
|
- BIGCHAINDB_ENDPOINT=bigchaindb
|
2018-03-21 12:42:43 +01:00
|
|
|
|
|
|
|
# Build docs only
|
|
|
|
# docker-compose build bdocs
|
|
|
|
# docker-compose up -d bdocs
|
|
|
|
bdocs:
|
|
|
|
depends_on:
|
|
|
|
- vdocs
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
dockerfile: Dockerfile-dev
|
|
|
|
args:
|
|
|
|
backend: localmongodb
|
|
|
|
volumes:
|
|
|
|
- .:/usr/src/app/
|
2020-05-18 15:22:26 +02:00
|
|
|
command: make -C docs/root html
|
2018-03-21 12:42:43 +01:00
|
|
|
vdocs:
|
|
|
|
image: nginx
|
|
|
|
ports:
|
|
|
|
- '33333:80'
|
|
|
|
volumes:
|
2020-05-18 15:22:26 +02:00
|
|
|
- ./docs/root/build/html:/usr/share/nginx/html
|