-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
203 lines (190 loc) · 4.7 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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
# SPDX-FileCopyrightText: 2021 Genome Research Ltd.
#
# SPDX-License-Identifier: MIT
# This is used for local development only
version: '3.1'
services:
tolid-db:
image: postgres:14
environment:
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
ports:
- "5433:5432"
tolid-api:
build:
context: tolid-api
dockerfile: Dockerfile.dev
environment:
- DB_URI
- TOLID_URL
- GOAT_URL
- GOAT_API_PATH
- MAIL_SENDER
- MAIL_SENDER_NAME
- MAIL_USERNAME_SMTP
- MAIL_PASSWORD_SMTP
- MAIL_HOST
- MAIL_PORT
- MAIL_RECEIVER_REQUESTS_PENDING
- ENVIRONMENT
- OIDC_CLIENT_ID
- OIDC_CLIENT_SECRET
- OIDC_REDIRECT_URI
- OIDC_AUTH_URL
- OIDC_USER_INFO_URL
- OIDC_TOKEN_URL
- OIDC_REVOKE_TOKEN_URL
- API_PATH
- API_DATA_PATH
- API_CUSTOM_PATH
- API_SYSTEM_PATH
- API_AUTH_PATH
ports:
- "8080:80"
volumes:
- './tolid-api/app/main:/app/main'
- '../tol-sdk:/packages/tol-sdk:rw'
depends_on:
- tolid-apiv2
tolid-apiv2:
build:
context: tolid-apiv2/.
dockerfile: Dockerfile.dev
environment:
- DB_URI
- TOLID_URL
- ELIXIR_CLIENT_ID
- ELIXIR_CLIENT_SECRET
- ELIXIR_REDIRECT_URI
- ELIXIR_JWK
- MAIL_SENDER
- MAIL_SENDER_NAME
- MAIL_USERNAME_SMTP
- MAIL_PASSWORD_SMTP
- MAIL_HOST
- MAIL_PORT
- MAIL_RECEIVER_REQUESTS_PENDING
- ENVIRONMENT
ports:
- "8081:80"
volumes:
- './tolid-apiv2/app/main:/app/main'
- '../tol-sdk:/packages/tol-sdk:rw'
tolid-api-test:
build:
context: tolid-api
dockerfile: Dockerfile.test
command: pytest -vvvx test
volumes:
- './tolid-api/app/main:/app/main'
- '../tol-sdk:/packages/tol-sdk:rw'
tolid-ui:
build:
context: tolid-ui/.
dockerfile: Dockerfile.dev
environment:
- NODE_ENV=development
- REACT_APP_API_PATH=${API_PATH}
- REACT_APP_API_DATA_PATH=${API_DATA_PATH}
- REACT_APP_API_CUSTOM_PATH=${API_CUSTOM_PATH}
- REACT_APP_API_SYSTEM_PATH=${API_SYSTEM_PATH}
- REACT_APP_API_AUTH_PATH=${API_AUTH_PATH}
- REACT_APP_PORTAL_URL=${PORTAL_URL}
- REACT_APP_PORTAL_API_PATH=${PORTAL_API_PATH}
- REACT_APP_MATOMO_SITE_ID=${MATOMO_SITE_ID}
ports:
- "3002:3000"
volumes:
- './tolid-ui/app:/usr/src/app'
- '/usr/src/app/node_modules'
tolid-apiv2-test:
build:
context: tolid-apiv2.
dockerfile: Dockerfile.dev
command: dockerize
-wait tcp://tolid-db:5432 -timeout 10s
bash -c "pytest -v"
environment:
- DB_URI
- TOLID_URL
- ELIXIR_CLIENT_ID
- ELIXIR_CLIENT_SECRET
- ELIXIR_REDIRECT_URI
- ELIXIR_JWK
- MAIL_SENDER
- MAIL_SENDER_NAME
- MAIL_USERNAME_SMTP
- MAIL_PASSWORD_SMTP
- MAIL_HOST
- MAIL_PORT
- MAIL_RECEIVER_REQUESTS_PENDING
depends_on:
- tolid-db
- tolid-apiv2
tolid-ui-test:
build:
context: tolid-ui
dockerfile: Dockerfile.dev
command: yarn test
stdin_open: true
environment:
- NODE_ENV=development
volumes:
- './tolid-ui/app:/usr/src/app'
- '/usr/src/app/node_modules'
tolid-alembic:
build:
context: tolid-api/.
dockerfile: Dockerfile.dev
working_dir: /migrations
environment:
- DB_URI
volumes:
- './tolid-api/migrations/alembic/versions:/migrations/alembic/versions'
tolid-dbutils:
image: gitlab-registry.internal.sanger.ac.uk/tol/tol-core/dbutils:1.0.4
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
tolid-python-db:
image: postgres:14
environment:
- POSTGRES_USER=test-user
- POSTGRES_PASSWORD=test-password
- POSTGRES_DB=test-db
tolid-python-unit-test:
build:
context: tolid-api
dockerfile: Dockerfile.test
command: pytest -v unit
tolid-python-system-test:
build:
context: tolid-api
dockerfile: Dockerfile.test
command: pytest -v system
environment:
- DB_URI=postgresql://test-user:test-password@tolid-python-db:5432/test-db
- OIDC_CLIENT_ID
- OIDC_CLIENT_SECRET
- OIDC_REDIRECT_URI
- OIDC_AUTH_URL
- OIDC_USER_INFO_URL
- OIDC_TOKEN_URL
- OIDC_REVOKE_TOKEN_URL
- GOAT_URL
- GOAT_API_PATH
depends_on:
- tolid-python-db