-
Notifications
You must be signed in to change notification settings - Fork 10
/
docker-compose.yml
176 lines (175 loc) · 6.17 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
version: '3.7'
services:
keycloak-server:
image: docker.io/bitnami/keycloak:22
environment:
- KC_DB=postgres
- KC_DB_URL=jdbc:postgresql://keycloak-postgresql/bitnami_keycloak
- KC_DB_USERNAME=bn_keycloak
# default expiration days of apiKeys is 365
# - APIKEY_DURATION_DAYS=365
ports:
- "9082:8080"
depends_on:
- keycloak-postgresql
volumes:
- type: bind
source: ./docker/keycloak-init/data_import
target: /opt/bitnami/keycloak/data/import
command:
- /bin/bash
- -c
- |
curl -sL https://github.com/oicr-softeng/keycloak-apikeys/releases/download/1.0.1/keycloak-apikeys-1.0.1.jar -o /opt/bitnami/keycloak/providers/keycloak-apikeys-1.0.1.jar
kc.sh start-dev --import-realm
keycloak-postgresql:
image: docker.io/bitnami/postgresql:11
environment:
# ALLOW_EMPTY_PASSWORD is recommended only for development.
- ALLOW_EMPTY_PASSWORD=yes
- POSTGRESQL_USERNAME=bn_keycloak
- POSTGRESQL_DATABASE=bitnami_keycloak
expose:
- "5432"
ports:
- "9444:5432"
object-storage:
#NOTE: must use 2018-05-11 version, since the ETag rules are different. 2018 will return the part md5, anything newer will not, and score-server expects etag==md5
image: minio/minio:RELEASE.2018-05-11T00-29-24Z
environment:
MINIO_ACCESS_KEY: minio
MINIO_SECRET_KEY: minio123
command: server /data
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:9000/minio/health/live" ]
interval: 30s
timeout: 20s
retries: 3
ports:
- "8085:9000"
score-server:
build:
context: ./
dockerfile: "$DOCKERFILE_NAME"
target: server
environment:
SPRING_PROFILES_ACTIVE: s3,prod,secure
SERVER_PORT: 8080
OBJECT_SENTINEL: heliograph
BUCKET_NAME_OBJECT: score.data
BUCKET_NAME_STATE: score.data
COLLABORATORY_DATA_DIRECTORY: data
METADATA_URL: http://song-server:8080
S3_ENDPOINT: http://object-storage:9000
# enable this to test s3 host override
#S3_PRESIGNEDURL_OVERRIDE_HOST: http://localhost:8085
S3_ACCESSKEY: minio
S3_SECRETKEY: minio123
S3_SIGV4ENABLED: "true"
SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_JWK_SET_URI: http://keycloak-server:8080/realms/myrealm/protocol/openid-connect/certs
AUTH_SERVER_URL: http://keycloak-server:8080/realms/myrealm/apikey/check_api_key/
AUTH_SERVER_TOKENNAME: apiKey
AUTH_SERVER_CLIENTID: system
AUTH_SERVER_CLIENTSECRET: systemsecret
AUTH_SERVER_PROVIDER: keycloak
AUTH_SERVER_KEYCLOAK_HOST: http://keycloak-server:8080
AUTH_SERVER_KEYCLOAK_REALM: myrealm
AUTH_SERVER_SCOPE_STUDY_PREFIX: PROGRAMDATA.
AUTH_SERVER_SCOPE_UPLOAD_SUFFIX: .WRITE
AUTH_SERVER_SCOPE_DOWNLOAD_SUFFIX: .READ
AUTH_SERVER_SCOPE_DOWNLOAD_SYSTEM: score.WRITE
AUTH_SERVER_SCOPE_UPLOAD_SYSTEM: score.READ
SERVER_SSL_ENABLED: "false"
UPLOAD_PARTSIZE: 1073741824
UPLOAD_CONNECTION_TIMEOUT: 1200000
LOGGING_LEVEL_BIO_OVERTURE_SCORE_SERVER: DEBUG
LOGGING_LEVEL_ORG_APACHE_HTTP_WIRE: DEBUG
LOGGING_LEVEL_ORG_APACHE_HTTP_HEADERS: DEBUG
ENDPOINTS_DUMP_ENABLED: "false"
ENDPOINTS_ENV_ENABLED: "true"
ENDPOINTS_INFO_ENABLED: "true"
JAVA_TOOL_OPTIONS: -agentlib:jdwp=transport=dt_socket,address=*:5006,server=y,suspend=n
ports:
- "8087:8080"
- "5006:5006"
depends_on:
- object-storage
- song-server
volumes:
- "./docker/scratch/storage-server-logs:/opt/dcc/storage_server_logs"
score-client:
build:
context: ./
dockerfile: "$DOCKERFILE_NAME"
target: client
environment:
ACCESSTOKEN: 07a5a12e-a85f-4248-a9a1-851a8062b6ac
METADATA_URL: http://song-server:8080
STORAGE_URL: http://score-server:8080
JAVA_TOOL_OPTIONS: -agentlib:jdwp=transport=dt_socket,address=*:5005,server=y,suspend=n
ports:
- "5005:5005"
volumes:
- "./docker/score-client-init:/data"
- "./docker/scratch/score-client-logs:/score-client/logs"
command: bin/score-client
user: "$MY_UID:$MY_GID"
song-db:
image: "postgres:11.1"
environment:
POSTGRES_DB: song
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
expose:
- "5432"
ports:
- "12345:5432"
volumes:
- "./docker/song-db-init:/docker-entrypoint-initdb.d"
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 15s
timeout: 15s
retries: 5
aws-cli:
image: "mesosphere/aws-cli:latest"
environment:
AWS_ACCESS_KEY_ID: minio
AWS_SECRET_ACCESS_KEY: minio123
AWS_DEFAULT_REGION: us-east-1
volumes:
- "./docker/object-storage-init/data/score.data/data:/score-data:ro"
song-server:
image: ghcr.io/overture-stack/song-server:438c2c42
environment:
SERVER_PORT: 8080
SPRING_PROFILES_ACTIVE: "prod,secure,default"
SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_JWK_SET_URI: http://keycloak-server:8080/realms/myrealm/protocol/openid-connect/certs
AUTH_SERVER_INTROSPECTIONURI: http://keycloak-server:8080/realms/myrealm/apikey/check_api_key/
AUTH_SERVER_TOKENNAME: apiKey
AUTH_SERVER_CLIENTID: system
AUTH_SERVER_CLIENTSECRET: systemsecret
AUTH_SERVER_PROVIDER: keycloak
AUTH_SERVER_KEYCLOAK_HOST: http://keycloak-server:8080
AUTH_SERVER_KEYCLOAK_REALM: myrealm
AUTH_SERVER_SCOPE_STUDY_PREFIX: PROGRAMDATA.
AUTH_SERVER_SCOPE_STUDY_SUFFIX: .WRITE
AUTH_SERVER_SCOPE_SYSTEM: song.WRITE
SCORE_URL: http://score-server:8080
SCORE_ACCESSTOKEN: 07a5a12e-a85f-4248-a9a1-851a8062b6ac
MANAGEMENT_SERVER_PORT: 8081
ID_USELOCAL: "true"
SPRING_DATASOURCE_USERNAME: postgres
SPRING_DATASOURCE_PASSWORD: password
SPRING_DATASOURCE_URL: jdbc:postgresql://song-db/song?stringtype=unspecified
SPRING_FLYWAY_ENABLED: "true"
SPRING_FLYWAY_LOCATIONS: "classpath:db/migration"
ports:
- "8080:8080"
depends_on:
song-db:
condition: service_healthy
volumes:
- "./docker/scratch/song-server-logs:/opt/dcc/server_logs"
volumes:
object-storage-data: {}