-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
152 lines (141 loc) · 3.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
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
# SPDX-FileCopyrightText: 2022 Genome Research Ltd.
#
# SPDX-License-Identifier: MIT
# This is used for local development only
version: '3.2'
services:
tolqc-db:
image: postgres:12
environment:
- TZ=Europe/London
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
ports:
- 5435:5432
tolqc-api:
build:
context: ./tolqc-api
dockerfile: Dockerfile.dev
image: tolqc-api
# force amd64 on M1 MacOS
#platform: linux/amd64
environment:
- DB_URI
- TOLQC_URL
- API_PATH
- API_TOKEN
- 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
- ENVIRONMENT
- FLASK_ENV
ports:
- 8082:80
volumes:
- './tolqc-api/app/main:/app/main'
- '../tol-sdk:/packages/tol-sdk:rw'
tolqc-ui:
build:
context: ./tolqc-ui
dockerfile: Dockerfile.dev
image: tolqc-ui
# force amd64 on M1 MacOS
platform: linux/amd64
stdin_open: true
environment:
- NODE_ENV=development
- REACT_APP_API_PATH=${API_PATH}
- REACT_APP_MATOMO_SITE_ID=${MATOMO_SITE_ID}
ports:
- 3004:3000
volumes:
- './tolqc-ui/app:/usr/src/app'
- '/usr/src/app/node_modules'
tolqc-api-test:
image: tolqc-api
command: dockerize
-wait tcp://tolqc-db:5432 -timeout 10s
bash -c "pytest -v"
environment:
- DB_URI
- TOLQC_URL
- API_PATH
- API_TOKEN
- 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
- POSTGRES_USER
- POSTGRES_PASSWORD
depends_on:
- tolqc-db
- tolqc-api
tolqc-ui-test:
image: tolqc-ui
command: yarn test
stdin_open: true
environment:
- NODE_ENV=development
volumes:
- './tolqc-ui/app:/usr/src/app'
- '/usr/src/app/node_modules'
tolqc-dbutils:
image: gitlab-registry.internal.sanger.ac.uk/tol/tol-core/dbutils:1.0.3
environment:
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
- POSTGRES_HOST
- POSTGRES_PORT
- BACKUP_S3_ACCESS_KEY
- BACKUP_S3_SECRET_KEY
- BACKUP_S3_URI
- BACKUP_S3_BUCKET
- BACKUP_S3_SECURE
- RESTORE_FILE_PREFIX
- FLASK_ENV
- BACKUP_SCHEDULE
tolqc-alembic:
image: tolqc-api
container_name: tolqc-alembic
restart: always
environment:
- DB_URI
working_dir: /migrations
volumes:
- ./tolqc-api/migrations/alembic/versions:/migrations/alembic/versions
tolqc-python-db:
image: postgres:12
environment:
- TZ=Europe/London
- POSTGRES_USER=test-user
- POSTGRES_PASSWORD=test-password
- POSTGRES_DB=test-db
tolqc-python-unit-test:
build:
context: ./tolqc-api
dockerfile: Dockerfile.test
command: pytest -vv unit
tolqc-python-system-test:
build:
context: ./tolqc-api
dockerfile: Dockerfile.test
command: pytest -vv system
environment:
- DB_URI=postgresql://test-user:test-password@tolqc-python-db:5432/test-db
depends_on:
- tolqc-python-db