Skip to content
This repository has been archived by the owner on Jul 16, 2021. It is now read-only.

Commit

Permalink
split build into dev docker-compose config, and updated readme accord…
Browse files Browse the repository at this point in the history
…ingly
  • Loading branch information
afaulconbridge committed Nov 9, 2018
1 parent 950cd1a commit 1a79bf6
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
14 changes: 13 additions & 1 deletion README.md
Expand Up @@ -124,6 +124,18 @@ or:
docker-compose run --rm mrtarget --help
```

#### development with docker-compose

By default, the docker compose file will *not use a locally built image* because it will download the latest image from [quay.io/opentargets/mrtarget](https://www.quay.io/repository/opentargets/mrtarget). So any changes made will not be applied by default.

Docker-compose has the ability to layer multiple docker-compose.yml files together; by default, `docker-compose.override.yml` will be added to `docker-compose.yml`. This can be used to use an override to build the image locally i.e.:

```sh
docker-compose run --rm -f docker-compose.yml -f docker-compose.dev.yml mrtarget --dry-run my-elasticsearch-prefix
```

This is done because overrides cannot remove previous values, so once a build directive has been specified it will always be used. Therefore, the build instruction must be outside of the default docker-compose.yml to support cases where the pipeline should be run but not built.

---
## Using the Makefile

Expand Down Expand Up @@ -178,7 +190,7 @@ It is possible to use both docker and the makefile together. You will need to ov
docker-compose run --rm --entrypoint make mrtarget -j -l 8 -r -R -k all
```


As discussed above, by default, the docker compose file will *not use a locally built image*. See above for how to work with this.


---
Expand Down
6 changes: 6 additions & 0 deletions docker-compose.dev.yml
@@ -0,0 +1,6 @@
version: "3.6"
services:

mrtarget:
build:
context: ./
4 changes: 4 additions & 0 deletions docker-compose.yml
Expand Up @@ -51,6 +51,10 @@ services:
- ELASTICSEARCH_NODES=http://elasticsearch:9200
- CTTV_REDIS_REMOTE=true
- CTTV_REDIS_SERVER=redis:6379
volumes:
- ./log:/usr/src/app/log
- ./json:/usr/src/app/json
- ./qc:/usr/src/app/qc

volumes:
esdata:
Expand Down

0 comments on commit 1a79bf6

Please sign in to comment.