bigchaindb/docker-compose.yml

94 lines
2.4 KiB
YAML
Raw Normal View History

Problem: standardize docker-compose workflows (#2130) - Standardize docker-compose workflow - Change docker-compose version to 2.1 - why one might ask? because compose version 3.0 does not support depends on and inherits like we want to and is more aimed towards migration to using `docker stack`, for our current strategy `2.1` is a better choice. - change `bdb` service `bigchaindb` service - why? Introduced a new proxy service `bdb` which is just a dummy `busybox` image. - why? because this ensure via healthcheck of bigchaindb that BigchainDB has started properly and makes a `curl` to ensure HTTP API server is up and running. - why? Because we have had scenarios where BigchainDB is not started via docker compose and user has to check out the logs to find out what the problem might be. This ensure that bigchaindb is up and running. - Does this change deployment workflow? No. - The only thing change is that if you want to run commands inside a bigchaindb container e.g. `pytest` now you have to run the following command: `docker-compose run --rm --no-deps bigchaindb pytest -v --cov=bigchaindb` as opposed to `docker-compose run --rm --no-deps bdb pytest -v --cov=bigchaindb` - Remove env variable `BIGCHAINDB_START_TENDERMINT` - Remove TENDERMINT_INTEGRATION.rst and move to the new docs - Change mdb -> mongodb because the other services were named with full name. - Add example to run specific tests or from a file - Update config.toml for tendermint to use `bigchaindb` as proxy app instead of `bdb` - Remove `network` directory because it is deprecated - Add comment about why PYTHONBUFFERED is used
2018-03-21 12:42:43 +01:00
version: '2.1'
2016-02-10 19:55:33 +01:00
services:
Problem: standardize docker-compose workflows (#2130) - Standardize docker-compose workflow - Change docker-compose version to 2.1 - why one might ask? because compose version 3.0 does not support depends on and inherits like we want to and is more aimed towards migration to using `docker stack`, for our current strategy `2.1` is a better choice. - change `bdb` service `bigchaindb` service - why? Introduced a new proxy service `bdb` which is just a dummy `busybox` image. - why? because this ensure via healthcheck of bigchaindb that BigchainDB has started properly and makes a `curl` to ensure HTTP API server is up and running. - why? Because we have had scenarios where BigchainDB is not started via docker compose and user has to check out the logs to find out what the problem might be. This ensure that bigchaindb is up and running. - Does this change deployment workflow? No. - The only thing change is that if you want to run commands inside a bigchaindb container e.g. `pytest` now you have to run the following command: `docker-compose run --rm --no-deps bigchaindb pytest -v --cov=bigchaindb` as opposed to `docker-compose run --rm --no-deps bdb pytest -v --cov=bigchaindb` - Remove env variable `BIGCHAINDB_START_TENDERMINT` - Remove TENDERMINT_INTEGRATION.rst and move to the new docs - Change mdb -> mongodb because the other services were named with full name. - Add example to run specific tests or from a file - Update config.toml for tendermint to use `bigchaindb` as proxy app instead of `bdb` - Remove `network` directory because it is deprecated - Add comment about why PYTHONBUFFERED is used
2018-03-21 12:42:43 +01:00
# Build: docker-compose build -d bigchaindb
# Run: docker-compose run -d bdb
mongodb:
image: mongo:3.4.13
ports:
- "27017"
command: mongod
Problem: standardize docker-compose workflows (#2130) - Standardize docker-compose workflow - Change docker-compose version to 2.1 - why one might ask? because compose version 3.0 does not support depends on and inherits like we want to and is more aimed towards migration to using `docker stack`, for our current strategy `2.1` is a better choice. - change `bdb` service `bigchaindb` service - why? Introduced a new proxy service `bdb` which is just a dummy `busybox` image. - why? because this ensure via healthcheck of bigchaindb that BigchainDB has started properly and makes a `curl` to ensure HTTP API server is up and running. - why? Because we have had scenarios where BigchainDB is not started via docker compose and user has to check out the logs to find out what the problem might be. This ensure that bigchaindb is up and running. - Does this change deployment workflow? No. - The only thing change is that if you want to run commands inside a bigchaindb container e.g. `pytest` now you have to run the following command: `docker-compose run --rm --no-deps bigchaindb pytest -v --cov=bigchaindb` as opposed to `docker-compose run --rm --no-deps bdb pytest -v --cov=bigchaindb` - Remove env variable `BIGCHAINDB_START_TENDERMINT` - Remove TENDERMINT_INTEGRATION.rst and move to the new docs - Change mdb -> mongodb because the other services were named with full name. - Add example to run specific tests or from a file - Update config.toml for tendermint to use `bigchaindb` as proxy app instead of `bdb` - Remove `network` directory because it is deprecated - Add comment about why PYTHONBUFFERED is used
2018-03-21 12:42:43 +01:00
bigchaindb:
depends_on:
- mongodb
- tendermint
build:
context: .
dockerfile: Dockerfile-dev
args:
Problem: standardize docker-compose workflows (#2130) - Standardize docker-compose workflow - Change docker-compose version to 2.1 - why one might ask? because compose version 3.0 does not support depends on and inherits like we want to and is more aimed towards migration to using `docker stack`, for our current strategy `2.1` is a better choice. - change `bdb` service `bigchaindb` service - why? Introduced a new proxy service `bdb` which is just a dummy `busybox` image. - why? because this ensure via healthcheck of bigchaindb that BigchainDB has started properly and makes a `curl` to ensure HTTP API server is up and running. - why? Because we have had scenarios where BigchainDB is not started via docker compose and user has to check out the logs to find out what the problem might be. This ensure that bigchaindb is up and running. - Does this change deployment workflow? No. - The only thing change is that if you want to run commands inside a bigchaindb container e.g. `pytest` now you have to run the following command: `docker-compose run --rm --no-deps bigchaindb pytest -v --cov=bigchaindb` as opposed to `docker-compose run --rm --no-deps bdb pytest -v --cov=bigchaindb` - Remove env variable `BIGCHAINDB_START_TENDERMINT` - Remove TENDERMINT_INTEGRATION.rst and move to the new docs - Change mdb -> mongodb because the other services were named with full name. - Add example to run specific tests or from a file - Update config.toml for tendermint to use `bigchaindb` as proxy app instead of `bdb` - Remove `network` directory because it is deprecated - Add comment about why PYTHONBUFFERED is used
2018-03-21 12:42:43 +01:00
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
Problem: standardize docker-compose workflows (#2130) - Standardize docker-compose workflow - Change docker-compose version to 2.1 - why one might ask? because compose version 3.0 does not support depends on and inherits like we want to and is more aimed towards migration to using `docker stack`, for our current strategy `2.1` is a better choice. - change `bdb` service `bigchaindb` service - why? Introduced a new proxy service `bdb` which is just a dummy `busybox` image. - why? because this ensure via healthcheck of bigchaindb that BigchainDB has started properly and makes a `curl` to ensure HTTP API server is up and running. - why? Because we have had scenarios where BigchainDB is not started via docker compose and user has to check out the logs to find out what the problem might be. This ensure that bigchaindb is up and running. - Does this change deployment workflow? No. - The only thing change is that if you want to run commands inside a bigchaindb container e.g. `pytest` now you have to run the following command: `docker-compose run --rm --no-deps bigchaindb pytest -v --cov=bigchaindb` as opposed to `docker-compose run --rm --no-deps bdb pytest -v --cov=bigchaindb` - Remove env variable `BIGCHAINDB_START_TENDERMINT` - Remove TENDERMINT_INTEGRATION.rst and move to the new docs - Change mdb -> mongodb because the other services were named with full name. - Add example to run specific tests or from a file - Update config.toml for tendermint to use `bigchaindb` as proxy app instead of `bdb` - Remove `network` directory because it is deprecated - Add comment about why PYTHONBUFFERED is used
2018-03-21 12:42:43 +01:00
BIGCHAINDB_DATABASE_HOST: mongodb
BIGCHAINDB_DATABASE_PORT: 27017
BIGCHAINDB_SERVER_BIND: 0.0.0.0:9984
BIGCHAINDB_WSSERVER_HOST: 0.0.0.0
Problem: standardize docker-compose workflows (#2130) - Standardize docker-compose workflow - Change docker-compose version to 2.1 - why one might ask? because compose version 3.0 does not support depends on and inherits like we want to and is more aimed towards migration to using `docker stack`, for our current strategy `2.1` is a better choice. - change `bdb` service `bigchaindb` service - why? Introduced a new proxy service `bdb` which is just a dummy `busybox` image. - why? because this ensure via healthcheck of bigchaindb that BigchainDB has started properly and makes a `curl` to ensure HTTP API server is up and running. - why? Because we have had scenarios where BigchainDB is not started via docker compose and user has to check out the logs to find out what the problem might be. This ensure that bigchaindb is up and running. - Does this change deployment workflow? No. - The only thing change is that if you want to run commands inside a bigchaindb container e.g. `pytest` now you have to run the following command: `docker-compose run --rm --no-deps bigchaindb pytest -v --cov=bigchaindb` as opposed to `docker-compose run --rm --no-deps bdb pytest -v --cov=bigchaindb` - Remove env variable `BIGCHAINDB_START_TENDERMINT` - Remove TENDERMINT_INTEGRATION.rst and move to the new docs - Change mdb -> mongodb because the other services were named with full name. - Add example to run specific tests or from a file - Update config.toml for tendermint to use `bigchaindb` as proxy app instead of `bdb` - Remove `network` directory because it is deprecated - Add comment about why PYTHONBUFFERED is used
2018-03-21 12:42:43 +01:00
BIGCHAINDB_TENDERMINT_HOST: tendermint
BIGCHAINDB_TENDERMINT_PORT: 46657
ports:
- "9984:9984"
- "9985:9985"
Problem: standardize docker-compose workflows (#2130) - Standardize docker-compose workflow - Change docker-compose version to 2.1 - why one might ask? because compose version 3.0 does not support depends on and inherits like we want to and is more aimed towards migration to using `docker stack`, for our current strategy `2.1` is a better choice. - change `bdb` service `bigchaindb` service - why? Introduced a new proxy service `bdb` which is just a dummy `busybox` image. - why? because this ensure via healthcheck of bigchaindb that BigchainDB has started properly and makes a `curl` to ensure HTTP API server is up and running. - why? Because we have had scenarios where BigchainDB is not started via docker compose and user has to check out the logs to find out what the problem might be. This ensure that bigchaindb is up and running. - Does this change deployment workflow? No. - The only thing change is that if you want to run commands inside a bigchaindb container e.g. `pytest` now you have to run the following command: `docker-compose run --rm --no-deps bigchaindb pytest -v --cov=bigchaindb` as opposed to `docker-compose run --rm --no-deps bdb pytest -v --cov=bigchaindb` - Remove env variable `BIGCHAINDB_START_TENDERMINT` - Remove TENDERMINT_INTEGRATION.rst and move to the new docs - Change mdb -> mongodb because the other services were named with full name. - Add example to run specific tests or from a file - Update config.toml for tendermint to use `bigchaindb` as proxy app instead of `bdb` - Remove `network` directory because it is deprecated - Add comment about why PYTHONBUFFERED is used
2018-03-21 12:42:43 +01:00
- "46658"
healthcheck:
test: ["CMD", "bash", "-c", "curl http://bigchaindb:9984 && curl http://tendermint:46657/abci_query"]
interval: 3s
timeout: 5s
retries: 3
entrypoint: '.ci/entrypoint.sh'
Problem: standardize docker-compose workflows (#2130) - Standardize docker-compose workflow - Change docker-compose version to 2.1 - why one might ask? because compose version 3.0 does not support depends on and inherits like we want to and is more aimed towards migration to using `docker stack`, for our current strategy `2.1` is a better choice. - change `bdb` service `bigchaindb` service - why? Introduced a new proxy service `bdb` which is just a dummy `busybox` image. - why? because this ensure via healthcheck of bigchaindb that BigchainDB has started properly and makes a `curl` to ensure HTTP API server is up and running. - why? Because we have had scenarios where BigchainDB is not started via docker compose and user has to check out the logs to find out what the problem might be. This ensure that bigchaindb is up and running. - Does this change deployment workflow? No. - The only thing change is that if you want to run commands inside a bigchaindb container e.g. `pytest` now you have to run the following command: `docker-compose run --rm --no-deps bigchaindb pytest -v --cov=bigchaindb` as opposed to `docker-compose run --rm --no-deps bdb pytest -v --cov=bigchaindb` - Remove env variable `BIGCHAINDB_START_TENDERMINT` - Remove TENDERMINT_INTEGRATION.rst and move to the new docs - Change mdb -> mongodb because the other services were named with full name. - Add example to run specific tests or from a file - Update config.toml for tendermint to use `bigchaindb` as proxy app instead of `bdb` - Remove `network` directory because it is deprecated - Add comment about why PYTHONBUFFERED is used
2018-03-21 12:42:43 +01:00
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