-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
126 lines (116 loc) · 2.9 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# SPDX-FileCopyrightText: 2021 Genome Research Ltd.
#
# SPDX-License-Identifier: MIT
# This is used for local development only
version: '3.1'
services:
submissions-db:
image: postgres:11
environment:
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
ports:
- 5434:5432
submissions-api:
build:
context: submissions-api/.
dockerfile: Dockerfile.dev
image: submissions-api
# force amd64 emulation on M1 Macs
platform: linux/amd64
environment:
- DB_URI
- ELIXIR_CLIENT_ID
- ELIXIR_CLIENT_SECRET
- ELIXIR_REDIRECT_URI
- ELIXIR_JWK
- TOLID_URL
- TOLID_API_KEY
- ENA_URL
- ENA_USERNAME
- ENA_PASSWORD
- ENA_CONTACT_NAME
- ENA_CONTACT_EMAIL
- STS_URL
- STS_API_KEY
- NIH_API_KEY
- ENVIRONMENT
ports:
- 8081:80
volumes:
- './submissions-api/app/main:/app/main'
submissions-ui:
build:
context: submissions-ui/.
dockerfile: Dockerfile.dev
# force amd64 on M1 MacOS
platform: linux/amd64
image: submissions-ui
stdin_open: true
environment:
- NODE_ENV=development
ports:
- 3003:3000
volumes:
- './submissions-ui/app:/usr/src/app'
- '/usr/src/app/node_modules'
submissions-ui-test:
image: submissions-ui
command: yarn test
stdin_open: true
environment:
- NODE_ENV=development
volumes:
- './submissions-ui/app:/usr/src/app'
- '/usr/src/app/node_modules'
submissions-alembic:
image: submissions-api
container_name: submissions-alembic
restart: always
environment:
- DB_URI
- DB_LEGACY_TABLES
entrypoint: /migrations/alembic/docker-entrypoint.sh
working_dir: /migrations
volumes:
- ./submissions-api/migrations/alembic/versions:/migrations/alembic/versions
submissions-dbutils:
image: gitlab-registry.internal.sanger.ac.uk/tol/tol-core/dbutils:1.0.2
restart: always
environment:
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
- POSTGRES_HOST
- POSTGRES_PORT
- BACKUP_S3_URI
- BACKUP_S3_ACCESS_KEY
- BACKUP_S3_SECRET_KEY
- BACKUP_S3_BUCKET
- BACKUP_S3_SECURE
- BACKUP_SCHEDULE
- RESTORE_FILE_PREFIX
- FLASK_ENV
submissions-python-db:
image: postgres:12
environment:
- POSTGRES_USER=test-user
- POSTGRES_PASSWORD=test-password
- POSTGRES_DB=test-db
submissions-python-unit-test:
build:
context: submissions-api
dockerfile: Dockerfile.test
command: pytest -v unit
submissions-python-system-test:
build:
context: submissions-api
dockerfile: Dockerfile.test
command: pytest -v system
environment:
- DB_URI=postgresql://test-user:test-password@submissions-python-db:5432/test-db
- API_PATH
- API_TOKEN
depends_on:
- submissions-python-db