Use MongoDB as default db in docker-compose file

This commit is contained in:
Sylvain Bellemare 2017-04-13 15:37:18 +02:00 committed by Sylvain Bellemare
parent ebe89c3ebd
commit b4eb75ede5
3 changed files with 24 additions and 24 deletions

View File

@ -28,7 +28,7 @@ services:
- /data - /data
command: "true" command: "true"
bdb: bdb-rdb:
build: build:
context: . context: .
dockerfile: Dockerfile-dev dockerfile: Dockerfile-dev
@ -50,7 +50,7 @@ services:
- "9984" - "9984"
command: bigchaindb start command: bigchaindb start
bdb-mdb: bdb:
build: build:
context: . context: .
dockerfile: Dockerfile-dev dockerfile: Dockerfile-dev

View File

@ -98,19 +98,19 @@ web interface at: http://0.0.0.0:58080/.
Start a BigchainDB node: Start a BigchainDB node:
```bash ```bash
docker-compose up -d bdb docker-compose up -d bdb-rdb
``` ```
You can monitor the logs: You can monitor the logs:
```bash ```bash
docker-compose logs -f bdb docker-compose logs -f bdb-rdb
``` ```
If you wish to run the tests: If you wish to run the tests:
```bash ```bash
docker-compose run --rm bdb py.test -v -n auto docker-compose run --rm bdb-rdb py.test -v -n auto
``` ```
### Docker with MongoDB ### Docker with MongoDB
@ -130,19 +130,19 @@ $ docker-compose port mdb 27017
Start a BigchainDB node: Start a BigchainDB node:
```bash ```bash
docker-compose up -d bdb-mdb docker-compose up -d bdb
``` ```
You can monitor the logs: You can monitor the logs:
```bash ```bash
docker-compose logs -f bdb-mdb docker-compose logs -f bdb
``` ```
If you wish to run the tests: If you wish to run the tests:
```bash ```bash
docker-compose run --rm bdb-mdb py.test -v --database-backend=mongodb docker-compose run --rm bdb py.test -v --database-backend=mongodb
``` ```
### Accessing the HTTP API ### Accessing the HTTP API

View File

@ -68,20 +68,6 @@ The `pytest` command has many options. If you want to learn about all the things
You can also use [Docker Compose](https://docs.docker.com/compose/) to run all the tests. You can also use [Docker Compose](https://docs.docker.com/compose/) to run all the tests.
#### With RethinkDB as the backend
First, start `RethinkDB` in the background:
```text
$ docker-compose up -d rdb
```
then run the tests using:
```text
$ docker-compose run --rm bdb py.test -v
```
#### With MongoDB as the backend #### With MongoDB as the backend
First, start `MongoDB` in the background: First, start `MongoDB` in the background:
@ -93,7 +79,7 @@ $ docker-compose up -d mdb
then run the tests using: then run the tests using:
```text ```text
$ docker-compose run --rm bdb-mdb py.test -v $ docker-compose run --rm bdb py.test -v
``` ```
If you've upgraded to a newer version of BigchainDB, you might have to rebuild If you've upgraded to a newer version of BigchainDB, you might have to rebuild
@ -103,8 +89,22 @@ the images before being able to run the tests. Run:
$ docker-compose build $ docker-compose build
``` ```
#### With RethinkDB as the backend
First, start `RethinkDB` in the background:
```text
$ docker-compose up -d rdb
```
then run the tests using:
```text
$ docker-compose run --rm bdb-rdb py.test -v
```
to rebuild all the images (usually you only need to rebuild the `bdb` and to rebuild all the images (usually you only need to rebuild the `bdb` and
`bdb-mdb` images). `bdb-rdb` images).
## Automated Testing of All Pull Requests ## Automated Testing of All Pull Requests