Skip to content

Commit d67f88a

Browse files
Load keycloak configuration on startup, rename financial-app to localhost
1 parent ffddd00 commit d67f88a

File tree

6 files changed

+1533
-157
lines changed

6 files changed

+1533
-157
lines changed

api-gateway/src/main/docker/config-kong.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ curl -S -s -i -X POST --url http://api-gateway:8001/services/instrument-service
99
curl -S -s -i -X POST --url http://api-gateway:8001/services/valuation-service/routes --data "paths[]=/api/v1/valuation"
1010
curl -S -s -i -X POST --url http://api-gateway:8001/services/regulatory-service/routes --data "paths[]=/api/v1/regulatory"
1111
#Enable the Open ID Plugin
12-
curl -S -s -i -X POST --url http://api-gateway:8001/plugins --data "name=oidc" --data "config.client_id=api-gateway" --data "config.client_secret=798751a9-d274-4335-abf6-80611cd19ba1" --data "config.discovery=https%3A%2F%2Ffinancial-app.com%2Fauth%2Frealms%2Fmaster%2F.well-known%2Fopenid-configuration"
12+
curl -S -s -i -X POST --url http://api-gateway:8001/plugins --data "name=oidc" --data "config.client_id=api-gateway" --data "config.client_secret=798751a9-d274-4335-abf6-80611cd19ba1" --data "config.discovery=https%3A%2F%2Flocalhost%2Fauth%2Frealms%2Fapigw%2F.well-known%2Fopenid-configuration"

docker-compose/docker-compose-api-gw.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ services:
2222
restart: on-failure
2323
stdin_open: true
2424
tty: true
25-
25+
2626
api-gateway:
2727
image: unige/api-gateway
2828
container_name: api-gateway
@@ -32,7 +32,7 @@ services:
3232
- gateway-network
3333
- backend-network
3434
command: >
35-
sh -c "kong migrations up && sh /docker-entrypoint.sh kong docker-start --v --nginx-conf /usr/local/kong/template/nginx-custom-static-sso.template"
35+
sh -c "kong migrations bootstrap && kong migrations up && sh /docker-entrypoint.sh kong docker-start --v --nginx-conf /usr/local/kong/template/nginx-custom-static-sso.template"
3636
healthcheck:
3737
test: ["CMD", "curl", "-X", "GET", "http://localhost:8001"]
3838
interval: 30s
@@ -108,7 +108,9 @@ services:
108108
- backend-network
109109
restart: on-failure
110110
ports:
111-
- 8080:8080
111+
- 8080:8080
112+
volumes:
113+
- ./iam-config/:/tmp/iam-config
112114
environment:
113115
- KEYCLOAK_USER=admin
114116
- KEYCLOAK_PASSWORD=password
@@ -119,6 +121,7 @@ services:
119121
- DB_PORT=5432
120122
- DB_DATABASE=keycloakdb
121123
- PROXY_ADDRESS_FORWARDING=true
124+
- KEYCLOAK_IMPORT=/tmp/iam-config/master.realm.json
122125
depends_on:
123126
iam-db :
124127
condition: service_healthy

0 commit comments

Comments
 (0)