mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00

* Problem: it's difficult to run/test/compile docs Solution: we already have a nice Makefile, but it's outdated. The idea is to revamp it and make it easy to use. * Problem: Makefile is not documented Solution: Add basic instructions on how to use it in the main README.md * Problem: can't connect to localhost:9984 Solution: make docker expose 9984 by default, so everyone can connect to localhost:9984. * Problem: make clean is TMI Solution: add `@` to remove commands so we don't output all the details about the cleaning * Problem: make clean is too shy Solution: print a message saying that cleaning went well.
94 lines
2.3 KiB
YAML
94 lines
2.3 KiB
YAML
version: '2.1'
|
|
|
|
services:
|
|
# Build: docker-compose build -d bigchaindb
|
|
# Run: docker-compose run -d bdb
|
|
mongodb:
|
|
image: mongo:3.4.13
|
|
ports:
|
|
- "27017"
|
|
command: mongod
|
|
bigchaindb:
|
|
depends_on:
|
|
- mongodb
|
|
- tendermint
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile-dev
|
|
args:
|
|
backend: localmongodb
|
|
volumes:
|
|
- ./bigchaindb:/usr/src/app/bigchaindb
|
|
- ./tests:/usr/src/app/tests
|
|
- ./docs:/usr/src/app/docs
|
|
- ./htmlcov:/usr/src/app/htmlcov
|
|
- ./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:
|
|
BIGCHAINDB_DATABASE_BACKEND: localmongodb
|
|
BIGCHAINDB_DATABASE_HOST: mongodb
|
|
BIGCHAINDB_DATABASE_PORT: 27017
|
|
BIGCHAINDB_SERVER_BIND: 0.0.0.0:9984
|
|
BIGCHAINDB_WSSERVER_HOST: 0.0.0.0
|
|
BIGCHAINDB_TENDERMINT_HOST: tendermint
|
|
BIGCHAINDB_TENDERMINT_PORT: 46657
|
|
ports:
|
|
- "9984:9984"
|
|
- "9985:9985"
|
|
- "46658"
|
|
healthcheck:
|
|
test: ["CMD", "bash", "-c", "curl http://bigchaindb:9984 && curl http://tendermint:46657/abci_query"]
|
|
interval: 3s
|
|
timeout: 5s
|
|
retries: 3
|
|
command: bigchaindb start
|
|
tendermint:
|
|
image: tendermint/tendermint:0.12
|
|
volumes:
|
|
- ./tmdata/config.toml:/tendermint/config.toml
|
|
entrypoint: ''
|
|
ports:
|
|
- "46656"
|
|
- "46657"
|
|
command: bash -c "tendermint init && tendermint node"
|
|
bdb:
|
|
image: busybox
|
|
depends_on:
|
|
bigchaindb:
|
|
condition: service_healthy
|
|
|
|
|
|
# curl client to check the health of development env
|
|
curl-client:
|
|
image: appropriate/curl
|
|
command: /bin/sh -c "curl http://tendermint:46657/abci_query && curl http://bigchaindb:9984/"
|
|
|
|
# Python BigchainDB driver to interact with the BigchainDB server
|
|
bdb-driver:
|
|
build:
|
|
context: .
|
|
dockerfile: ./tools/py-bigchaindb-driver/Dockerfile
|
|
|
|
# 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/
|
|
command: make -C docs/server html
|
|
vdocs:
|
|
image: nginx
|
|
ports:
|
|
- '33333:80'
|
|
volumes:
|
|
- ./docs/server/build/html:/usr/share/nginx/html
|