Skip to content

Commit

Permalink
feat : enable OIDC login (#762)
Browse files Browse the repository at this point in the history
* feat : enable OIDC login

* fix : issue with location

* fix issue with starting docker app

* adds retailstore-webapp to prometheus

* adds sequence diagram

* attempt to fix port issue

* fix : URLs

* temporary removejunit

* grammar fix
  • Loading branch information
rajadilipkolli authored Jun 16, 2024
1 parent b2a466d commit a1128ca
Show file tree
Hide file tree
Showing 25 changed files with 2,154 additions and 139 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ scrape_configs:
- targets: [ 'api-gateway:8765' ]
labels:
application: 'payment-service'
- job_name: 'retailstore-webapp'
scrape_interval: 2s
metrics_path: '/actuator/prometheus'
static_configs:
- targets: [ 'retailstore-webapp:8080' ]
labels:
application: 'retailstore-webapp'

rule_files:
- 'alert-rules.yml'
Expand Down
File renamed without changes.
File renamed without changes.
47 changes: 45 additions & 2 deletions docker-compose-tools.yml → deployment/docker-compose-tools.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '3.8'
name: spring-boot-microservices-series-v2
services:

postgresql:
Expand Down Expand Up @@ -101,7 +101,7 @@ services:
extra_hosts: [ 'host.docker.internal:host-gateway' ]
restart: "no"
ports:
- "9000:9000"
- "19000:9000"
environment:
KAFKA_BROKERCONNECT: "broker:29092"
depends_on:
Expand All @@ -110,6 +110,26 @@ services:
networks:
- microservice-network

keycloak:
image: quay.io/keycloak/keycloak:25.0.0
command: [ 'start-dev', '--http-port=9191' ]
container_name: keycloak
hostname: keycloak
extra_hosts: [ 'host.docker.internal:host-gateway' ]
volumes:
- ./realm-config:/opt/keycloak/data/import
environment:
- KEYCLOAK_ADMIN=admin
- KEYCLOAK_ADMIN_PASSWORD=admin1234
ports:
- "9191:9191"
networks:
- microservice-network
deploy:
resources:
limits:
memory: 2gb

config-server:
container_name: config-server
image: dockertmt/mmv2-config-server-21:0.0.1-SNAPSHOT
Expand Down Expand Up @@ -306,6 +326,29 @@ services:
logging_jobname: "containerlogs"
restart: unless-stopped

retailstore-webapp:
image: dockertmt/mmv2-retail-store-webapp:0.0.1-SNAPSHOT
container_name: retailstore-webapp
extra_hosts: [ 'host.docker.internal:host-gateway' ]
environment:
- SPRING_PROFILES_ACTIVE=docker
- RETAILSTORE_API_GATEWAY_URL=http://api-gateway:8765
- OAUTH2_SERVER_URL=http://keycloak:9191
- MANAGEMENT_ZIPKIN_TRACING_ENDPOINT=http://tempo:9411
ports:
- "8080:8080"
networks:
- microservice-network
deploy:
resources:
limits:
memory: 700m
labels:
logging: "promtail"
logging_jobname: "containerlogs"
restart: unless-stopped


## Observability
grafana:
image: grafana/grafana:11.0.0
Expand Down
38 changes: 37 additions & 1 deletion docker-compose.yml → deployment/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '3.9'
name: spring-boot-microservices-series-v2
services:

postgresql:
Expand Down Expand Up @@ -94,6 +94,24 @@ services:
networks:
- microservice-network

keycloak:
image: quay.io/keycloak/keycloak:25.0.0
command: [ 'start-dev', '--import-realm', '--http-port=9191' ]
container_name: keycloak
extra_hosts: [ 'host.docker.internal:host-gateway' ]
hostname: keycloak
volumes:
- ./realm-config:/opt/keycloak/data/import
environment:
- KEYCLOAK_ADMIN=admin
- KEYCLOAK_ADMIN_PASSWORD=admin1234
ports:
- "9191:9191"
deploy:
resources:
limits:
memory: 2gb

config-server:
container_name: config-server
image: dockertmt/mmv2-config-server-21:0.0.1-SNAPSHOT
Expand Down Expand Up @@ -258,6 +276,24 @@ services:
- SPRING_CONFIG_IMPORT=configserver:http://docker-dev:docker-pass@config-server:8888/
restart: unless-stopped

retailstore-webapp:
image: dockertmt/mmv2-retail-store-webapp:0.0.1-SNAPSHOT
container_name: retailstore-webapp
extra_hosts: [ 'host.docker.internal:host-gateway' ]
environment:
- SPRING_PROFILES_ACTIVE=docker
- RETAILSTORE_API_GATEWAY_URL=http://api-gateway:8765
- OAUTH2_SERVER_URL=http://keycloak:9191
ports:
- "8080:8080"
networks:
- microservice-network
restart: unless-stopped
deploy:
resources:
limits:
memory: 700m

networks:
microservice-network:

Expand Down
Loading

0 comments on commit a1128ca

Please sign in to comment.