Skip to content

Commit dbe7cfd

Browse files
committed
Update README w/ latest Compose details
1 parent 88afb49 commit dbe7cfd

File tree

1 file changed

+79
-32
lines changed

1 file changed

+79
-32
lines changed

README.md

Lines changed: 79 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -208,51 +208,98 @@ The Filing API will run on `$(docker-machine ip):8080`
208208
The Public API will run on `$(docker-machine ip):8082`
209209

210210
#### To run the entire platform
211-
Clone the [HMDA Platform UI](https://github.com/cfpb/hmda-platform-ui) repo and the [HMDA Platform Auth](https://github.com/cfpb/hmda-platform-auth) repo into sibling directories of this one. Your directory structure should look like this:
212-
```shell
213-
~/dev/hmda-project$ ls -la
214-
total 16
215-
drwxr-xr-x 6 lortone staff 204B Jul 25 17:44 ./
216-
drwxr-xr-x 9 lortone staff 306B Jul 25 17:50 ../
217-
drwxr-xr-x 22 lortone staff 748B Jul 27 16:28 hmda-platform/
218-
drwxr-xr-x 25 lortone staff 850B Jul 25 17:13 hmda-platform-ui/
219-
drwxr-xr-x 23 lortone staff 796B Jul 28 17:15 hmda-platform-auth/
220-
```
221211

222-
From the _`hmda-platform-ui`'s_ root directory, run `yarn`. (Get yarn [here](https://yarnpkg.com/lang/en/docs/install/) if you don't have it installed.)
212+
1. Clone [hmda-platform-ui](https://github.com/cfpb/hmda-platform-ui) and
213+
[hmda-platform-auth](https://github.com/cfpb/hmda-platform-auth) into the same
214+
directory as hmda-platform.
223215

224-
From _`hmda-platform`'s_ root directory, run the following:
216+
~/dev/hmda-project$ ls -l
217+
drwxr-xr-x 22 lortone staff 748B Jul 27 16:28 hmda-platform/
218+
drwxr-xr-x 25 lortone staff 850B Jul 25 17:13 hmda-platform-ui/
219+
drwxr-xr-x 23 lortone staff 796B Jul 28 17:15 hmda-platform-auth/
225220

226-
```shell
227-
sbt clean assembly
228-
docker-compose up
229-
```
221+
1. Build hmda-platform-ui
230222

231-
This will bring up all the HMDA Platform services. The first run may take several minutes.
223+
cd hmda-platform-ui && \
224+
yarn && \
225+
cd ..
232226

233-
Next, find your docker machine's endpoint.
227+
**Note:** This requires [yarn](https://yarnpkg.com/lang/en/docs/install/) to be installed.
234228

235-
```shell
236-
# Typically defaults to 192.168.99.100, which will be used in the following examples
237-
docker-machine ip dev
238-
```
229+
1. Build hmda-platform
230+
231+
cd hmda-platform && \
232+
sbt clean assembly
233+
234+
1. Launch the stack with Docker Compose
235+
236+
docker-compose up
237+
238+
This will bring up all the HMDA Platform services. The first run may take several minutes.
239+
240+
1. Discover you Docker host's IP
239241

240-
Then, visit the following URLS and click advanced -> proceed. This will bypass self-signed cert errors from your browser when running the app.
242+
echo $DOCKER_HOST
241243

242-
- https://192.168.99.100:8443/
243-
- https://192.168.99.100:4443/
244-
- https://192.168.99.100:9443/
244+
...or if using Docker Machine...
245245

246-
Visit the app at http://192.168.99.100, click the "Login" button, and click "Register" when redirected to the keycloak login screen.
246+
docker-machine ip
247+
248+
**Note:** Docker Machine generally defaults to `192.168.99.100`. We reference that
249+
IP throught this doc. If your Docker host IP differs, please adjust these instructions
250+
to match the Docker host IP provided by your system.
251+
252+
1. Use it! Below are steps representing a standard HMDA filing:
253+
254+
1. Browse to the app at http://192.168.99.100.
255+
1. Select the "Login" button. This will redirect your browser to the Keycloak login screen.
256+
1. Select "create and account" on the login screen.
257+
1. Entry you account information and select "Register".
258+
259+
**Note:** You must register with an email address from our whitelist of email domains.
260+
For convenience, `bank0.com` and `bank1.com` address should be available automatically.
261+
262+
1. Browse to the mock email server at https://192.168.99.100:8443/mail/, and select the
263+
verification link in the email found there. This should take you back to the HMDA
264+
filing web app, now logged in.
265+
266+
**Note:** This "MailDev" services is for development purposes only. In the case of
267+
an actual HMDA filing, you would receive a confirmation to your actual email account.
268+
269+
1. Submit a HMDA filing. Several sample files can be found [here](https://github.com/cfpb/hmda-platform/tree/master/parser/jvm/src/test/resources/txt).
270+
271+
##### Updating an existing system
272+
273+
If you've updated any of the hmda-platform services, and would like to see those
274+
changes reflected in the Docker Compose setup, the simplest way to do this is to
275+
rebuild everything from scratch. The following command should be executed from
276+
within the `hmda-platform` directory.
277+
278+
```shell
279+
docker-compose stop -t0 && \
280+
docker-compose rm -vf && \
281+
cd ../hmda-platform-ui && \
282+
yarn && \
283+
cd ../hmda-platform && \
284+
sbt clean assembly && \
285+
docker-compose build --no-cache && \
286+
docker-compose up
287+
```
247288

248-
To use demo data there are two institutions available; Bank 0 and Bank 1. To register for either of these institutions you have to use the corresponding domain:
249289

250-
- Bank 0 = bank0.com
251-
- Bank 1 = bank1.com
290+
##### Service URLs
252291

253-
Confirm your signup via MailDev by visiting http://192.168.99.100:1080, opening the email, and clicking the verifying link.
292+
When running the full stack via Docker Compose, the following services are available:
254293

255-
You can now interact with the app/begin uploading files, etc.
294+
| Service | URL |
295+
|------------------------|-------------------------------------|
296+
| Filing UI | https://192.168.99.100 |
297+
| Filing API (Unsecured) | https://192.168.99.100:8080 |
298+
| Filing API (Secured) | https://192.168.99.100:4443/hmda/ |
299+
| Admin API | https://192.168.99.100:8081 |
300+
| Public API | https://192.168.99.100:4443/public/ |
301+
| Keycloak | https://192.168.99.100:8443 |
302+
| MailDev | https://192.168.99.100:8443/mail/ |
256303

257304
#### Development conveniences
258305

0 commit comments

Comments
 (0)