-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
94 lines (87 loc) · 2.36 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
version: '3'
services:
mongodb:
# Document database used by EMG API mostly for assembly contigs and annotations on them
image: mongo:4.0.17
ports:
- "27017:27017"
volumes:
- mongo-data:/data/db
mysql:
# Relational databased used by EMG API, managed by Django.
# For most dev purposes this isn't needed thanks to SQLite.
# Use this service for testing mysql-specific things.
image: mysql:5.6
profiles:
- mysql
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
- MYSQL_DATABASE=emg
ports:
- "3306:3306"
volumes:
- mysql-data:/var/lib/mysql
redis:
# Redis used for sourmash (genome search) job queue.
# NOT used for API caching at this time.
profiles:
- sourmash
image: redis:latest
ports:
- "6379:6379"
volumes:
- redis-data:/data
api:
# EMG API built on Django.
build:
context: ./emgapi/
dockerfile: docker/lite.Dockerfile
volumes:
- ./emgapi/:/opt/emgapi
- ./ebi-metagenomics-client/ci/:/opt/ci
- ./ebi-metagenomics-client/ci/emg_api_datafiles/results/:/opt/emgapi/results
- sourmash-data:/opt/sourmash
ports:
- "8000:8000"
depends_on:
- mongodb
environment:
- PYTHONUNBUFFERED=0
- EMG_CONFIG=${EMG_CONFIG} # must be specified as env var to `docker compose up`
- BACKLOG_CONFIG=config/backlog-local.yml
sourmash-queue:
# Job runner for the sourmash-based genome search microservice.
profiles:
- sourmash
build:
context: ./sourmash-queue/
dockerfile: Dockerfile
volumes:
- ./sourmash-queue/:/opt/app
- sourmash-data:/opt/sourmash
- type: bind
source: ./sourmash-queue/settings-local.py
target: /opt/app/settings.py
depends_on:
- redis
flower:
# Dashboard for viewing the state of the sourmash microservice job queue.
profiles:
- sourmash
build:
context: ./sourmash-queue/
dockerfile: Dockerfile
command: celery -A tasks flower --loglevel=INFO
volumes:
- ./sourmash-queue/:/opt/app
- ./sourmash-queue/settings-local.py:/opt/app/settings.py
- sourmash-data:/opt/sourmash
ports:
- "5555:5555" # for flower dashboard, browse to 127.0.0.1:5555
depends_on:
- redis
volumes:
redis-data:
sourmash-data:
mysql-data:
mongo-data: