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

- 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
34 lines
890 B
Plaintext
34 lines
890 B
Plaintext
FROM python:3.6
|
|
LABEL maintainer "dev@bigchaindb.com"
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y vim \
|
|
&& pip install -U pip \
|
|
&& pip install pynacl \
|
|
&& apt-get autoremove \
|
|
&& apt-get clean
|
|
|
|
ARG backend
|
|
|
|
# When developing with Python in a docker container, we are using PYTHONBUFFERED
|
|
# to force stdin, stdout and stderr to be totally unbuffered and to capture logs/outputs
|
|
ENV PYTHONUNBUFFERED 0
|
|
|
|
ENV BIGCHAINDB_DATABASE_PORT 27017
|
|
ENV BIGCHAINDB_DATABASE_BACKEND $backend
|
|
ENV BIGCHAINDB_SERVER_BIND 0.0.0.0:9984
|
|
ENV BIGCHAINDB_WSSERVER_HOST 0.0.0.0
|
|
ENV BIGCHAINDB_WSSERVER_SCHEME ws
|
|
|
|
ENV BIGCHAINDB_WSSERVER_ADVERTISED_HOST 0.0.0.0
|
|
ENV BIGCHAINDB_WSSERVER_ADVERTISED_SCHEME ws
|
|
|
|
ENV BIGCHAINDB_TENDERMINT_PORT 46657
|
|
|
|
RUN mkdir -p /usr/src/app
|
|
COPY . /usr/src/app/
|
|
WORKDIR /usr/src/app
|
|
RUN pip install --no-cache-dir -e .[dev]
|
|
RUN bigchaindb -y configure "$backend"
|
|
|