1
- # Assumes UI repo is cloned in parent directory
2
1
version : ' 2'
3
2
services :
3
+
4
4
api :
5
5
build : .
6
6
ports :
7
- - ' 9090 :8080'
8
- - ' 9091 :8081'
9
- - ' 9092 :8082'
7
+ - ' 8080 :8080'
8
+ - ' 8081 :8081'
9
+ - ' 8082 :8082'
10
10
volumes :
11
- - ./target/scala-2.12/hmda.jar:/opt/hmda.jar
11
+ - ./target/scala-2.12/hmda.jar:/opt/hmda.jar
12
12
depends_on :
13
13
- cassandra
14
14
- zookeeper
@@ -20,31 +20,36 @@ services:
20
20
CASSANDRA_CLUSTER_HOSTS : cassandra
21
21
CASSANDRA_CLUSTER_PORT : 9042
22
22
HMDA_IS_DEMO : ' true'
23
+ # lb settings
24
+ EXCLUDE_PORTS : ' 8080, 8081' # 8080 proxied through auth_proxy; 8081 (Admin API) doesn't need proxy
25
+ VIRTUAL_HOST : ' https://*:4443/public/*'
26
+ VIRTUAL_HOST_WEIGHT : 1 # avoids conflicts with auth_proxy
27
+ # add simple CORS support; proxypass /public/ to Public API
28
+ EXTRA_SETTINGS : ' rspadd Access-Control-Allow-Origin:\ *, reqirep "^([^ :]*)\ /public//?(.*)" "\1\ /\2"'
23
29
restart : always
24
30
25
31
ui :
26
32
build :
27
33
context : ../hmda-platform-ui
28
34
args :
29
35
SKIP_JS_BUILD : 1
30
- ports :
31
- - " 80:80"
32
36
depends_on :
33
37
- api
34
38
- auth_proxy
35
39
- keycloak
36
40
volumes :
37
41
- ../hmda-platform-ui/dist:/usr/src/app/dist
38
42
environment :
39
- APP_URL : http ://192.168.99.100
43
+ APP_URL : https ://192.168.99.100
40
44
HMDA_API : https://192.168.99.100:4443/hmda
41
45
KEYCLOAK_URL : https://192.168.99.100:8443/auth/realms/hmda
46
+ # lb settings
47
+ VIRTUAL_HOST : ' http://*:80/*, https://*:443/*'
48
+ EXCLUDE_PORTS : ' 443' # use lb's ssl instead of ui's nginx
49
+ FORCE_SSL : ' true' # redirect 80 to 443
42
50
43
51
keycloak :
44
52
build : ../hmda-platform-auth/keycloak
45
- ports :
46
- - ' 8080:8080'
47
- - ' 8443:8443'
48
53
environment :
49
54
KEYCLOAK_USER : admin
50
55
KEYCLOAK_PASSWORD : admin
@@ -53,27 +58,25 @@ services:
53
58
POSTGRES_PASSWORD : password
54
59
POSTGRES_SERVER : keycloak_db
55
60
POSTGRES_PORT : 5432
56
- INSTITUTION_SEARCH_URI : https://192.168.99.100:9443
61
+ PROXY_HTTPS_PORT : 8443
62
+ SMTP_SERVER : mail_dev
63
+ SMTP_PORT : 25
64
+ INSTITUTION_SEARCH_URI : ' https://192.168.99.100:4443/public/'
57
65
INSTITUTION_SEARCH_VALIDATE_SSL : " OFF"
58
- HOME_PAGE_URI : http ://192.168.99.100
59
- REDIRECT_URIS : ' [ "http ://192.168.99.100", "http ://192.168.99.100/oidc-callback", "http ://192.168.99.100/silent_renew.html" ]'
66
+ HOME_PAGE_URI : ' https ://192.168.99.100'
67
+ REDIRECT_URIS : ' [ "https ://192.168.99.100", "https ://192.168.99.100/oidc-callback", "https ://192.168.99.100/silent_renew.html" ]'
60
68
SUPPORT_EMAIL :
' [email protected] '
69
+ # lb settings
70
+ VIRTUAL_HOST : ' https://*:8443/*'
71
+ VIRTUAL_HOST_WEIGHT : 0
61
72
volumes :
62
73
- ' ../hmda-platform-auth/keycloak/themes/hmda:/opt/jboss/keycloak/themes/hmda'
63
74
# - '../hmda-platform-auth/keycloak/import:/opt/jboss/import'
64
75
65
76
# Set action to "export" to dump Keycloak realm data
66
- command : >
67
- -Dkeycloak.migration.action=import
68
- -Dkeycloak.migration.provider=dir
69
- -Dkeycloak.migration.dir=/opt/jboss/import/
70
- -Dkeycloak.migration.strategy=OVERWRITE_EXISTING
71
- -Dkeycloak.migration.usersExportStrategy=SKIP
72
- -b 0.0.0.0
77
+ command : ' ./docker-entrypoint.sh'
73
78
links :
74
- - mail_dev
75
79
- keycloak_db
76
- - api
77
80
78
81
keycloak_db :
79
82
image : postgres:9.6.1
@@ -84,31 +87,34 @@ services:
84
87
85
88
auth_proxy :
86
89
build : ../hmda-platform-auth/auth-proxy
87
- ports :
88
- - ' 4443:8443' # Auth Proxy
89
- - ' 9443:9443' # Institution Search
90
90
environment :
91
- OIDC_METADATA_URI : https://keycloak :8443/auth/realms/hmda/.well-known/openid-configuration
92
- OIDC_JWKS_URI : https://keycloak :8443/auth/realms/hmda/protocol/openid-connect/certs
91
+ OIDC_METADATA_URI : https://192.168.99.100 :8443/auth/realms/hmda/.well-known/openid-configuration
92
+ OIDC_JWKS_URI : https://192.168.99.100 :8443/auth/realms/hmda/protocol/openid-connect/certs
93
93
OIDC_CLIENT_ID : api
94
94
OIDC_REDIRECT_URI : https://192.168.99.100:8443
95
- CRYPTO_PASSPHRASE : abcdefghijklmnopqrstuvwxyz
96
- VALIDATE_SSL : " Off"
97
- CLAIM_HEADER_PREFIX : CFPB-HMDA-
98
- REMOTE_USER_CLAIM : preferred_username
99
- REMOTE_USER_HEADER : CFPB-HMDA-Username
95
+ OIDC_CRYPTO_PASSPHRASE : abcdefghijklmnopqrstuvwxyz
96
+ OIDC_VALIDATE_SSL : " Off"
97
+ OIDC_CLAIM_HEADER_PREFIX : CFPB-HMDA-
98
+ OIDC_REMOTE_USER_CLAIM : preferred_username
99
+ OIDC_REMOTE_USER_HEADER : CFPB-HMDA-Username
100
100
FILING_API_UPSTREAM_URI : http://api:8080/
101
101
FILING_API_PATH_PREFIX : /hmda/
102
- PUBLIC_API_UPSTREAM_URI : http://api:8082/
103
102
LOG_LEVEL : info
103
+ # lb settings
104
+ VIRTUAL_HOST : ' https://*:4443/*'
105
+ VIRTUAL_HOST_WEIGHT : 0
104
106
links :
105
107
- api
106
108
- keycloak
107
109
108
110
mail_dev :
109
111
image : djfarrelly/maildev:0.14.0
110
- ports :
111
- - ' 1080:80'
112
+ environment :
113
+ # lb settings
114
+ VIRTUAL_HOST : ' https://*:8443/mail/*'
115
+ VIRTUAL_HOST_WEIGHT : 1
116
+ EXCLUDE_PORTS : ' 25' # don't proxy SMTP port
117
+ EXTRA_SETTINGS : ' reqirep "^([^ :]*)\ /mail//?(.*)" "\1\ /\2"'
112
118
113
119
query_db :
114
120
image : postgres:9.6.1
@@ -131,4 +137,26 @@ services:
131
137
ports :
132
138
- ' 9042:9042'
133
139
- ' 7000:7000'
134
- - ' 7199:7199'
140
+ - ' 7199:7199'
141
+
142
+ lb :
143
+ image : dockercloud/haproxy
144
+ volumes :
145
+ - /var/run/docker.sock:/var/run/docker.sock
146
+ ports :
147
+ - ' 80:80' # ui http - redirects to https (443)
148
+ - ' 443:443' # ui https
149
+ - ' 8443:8443' # auth https - keycloak and maildev
150
+ - ' 4443:4443' # api https - auth_proxy and api's public api
151
+ links :
152
+ - api
153
+ - auth_proxy
154
+ - keycloak
155
+ - mail_dev
156
+ - ui
157
+ environment :
158
+ # EXTRA_GLOBAL_SETTINGS: 'debug' # enable for request logging
159
+ # Default SSL cert for ALL services served by lb
160
+ # SEE: https://github.com/docker/dockercloud-haproxy#pem-files
161
+ DEFAULT_SSL_CERT: '-----BEGIN RSA PRIVATE KEY-----\nMIIEpAIBAAKCAQEA0Mal2qHA1EXk0w4Lq7K7GHT/snGZrT/bIzGmZtQGzccb6OrO\nyBs0NI+bWKuZTStrewFYPKQ/r5N2twqoWAYHiTKcp9ykWE6KKcO3NjAv0bqsZXwi\nV7BcDstlYSjE5f+4i6uwUbQKG1huSwp22QaDXJx2MWS8towihZ03cCMq7DAJLDWP\n474GpsrxVKscfZMgcUUEly7jY+y4/ot/RJE1/cwNAd7R2mUaiE8kZ3KO804UplJB\njUGzZp5zQEeqgO27esD9teYnQRLVwWbB5BkY38Uh9DOK8zUUJK3uJvAC0lUsftus\n8sloYQky2v5u8xpJQMVYNcEctp1CTh4FllRy1wIDAQABAoIBAQDCGY2lAHGIaRre\n5dYP4XF0wYHgYyFfI1kXFVgBjeptckoOeA+blz8oBsOE4rT6O/4HNC7W4lWbZNwg\nPTZZ7/EdqwJeRhI9T3fAcIdrR82NjaIuE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