generated from it-at-m/oss-repository-en-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* docker-compose created * docker.yml added --------- Co-authored-by: DanielOber <[email protected]> Co-authored-by: Der-Alex-K <[email protected]>
- Loading branch information
1 parent
5666d56
commit 48a8b13
Showing
8 changed files
with
160 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
server: | ||
port: 8082 | ||
|
||
spring: | ||
|
||
# Define the local keycloak realm here | ||
realm: Dave | ||
|
||
session.timeout: 36000 | ||
|
||
# spring cloud gateway config | ||
cloud: | ||
gateway: | ||
actuator: | ||
verbose: | ||
enabled: false | ||
globalcors: | ||
corsConfigurations: | ||
# The cors configuration to allow frontend developers cross origin request via this api gateway | ||
'[/**]': | ||
allowedOrigins: | ||
- "http://localhost:8081" | ||
- "http://127.0.0.1:8081" | ||
allowedMethods: "*" | ||
allowedHeaders: "*" | ||
allowCredentials: true | ||
maxAge: 3600 | ||
routes: | ||
- id: sso | ||
uri: ${SSO_BASE_URL} | ||
predicates: | ||
- Path=/api/sso/userinfo | ||
filters: | ||
- RewritePath=/api/sso/userinfo, /auth/realms/${spring.realm}/protocol/openid-connect/userinfo | ||
- id: backend | ||
uri: http://dave-backend:39146/ | ||
predicates: | ||
- Path=/api/dave-backend-service/** | ||
filters: | ||
- name: Retry | ||
args: | ||
retries: 2 | ||
methods: GET,POST | ||
backoff: | ||
firstBackoff: 10ms | ||
maxBackoff: 50ms | ||
factor: 2 | ||
basedOnPreviousValue: false | ||
- RewritePath=/api/dave-backend-service/(?<urlsegments>.*), /$\{urlsegments} | ||
- RemoveResponseHeader=WWW-Authenticate | ||
- id: eai | ||
uri: http://localhost:8080/ | ||
predicates: | ||
- Path=/api/dave-eai-service/** | ||
metadata: | ||
response-timeout: 1800000 | ||
filters: | ||
- RewritePath=/api/dave-eai-service/(?<urlsegments>.*), /$\{urlsegments} | ||
- RemoveResponseHeader=WWW-Authenticate | ||
default-filters: | ||
- RemoveResponseHeader=Expires | ||
- RemoveRequestHeader=cookie | ||
- RemoveRequestHeader=x-xsrf-token | ||
- TokenRelay= | ||
|
||
# security config | ||
security: | ||
oauth2: | ||
client: | ||
provider: | ||
keycloak: | ||
issuer-uri: ${SSO_BASE_URL}/auth/realms/${spring.realm} | ||
registration: | ||
keycloak: | ||
client-id: dave | ||
client-secret: ${SSO_CLIENT_SECRET} | ||
|
||
http: | ||
log-request-details: on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
spring: | ||
autoconfigure: | ||
exclude: | ||
- org.springframework.cloud.security.oauth2.gateway.TokenRelayAutoConfiguration | ||
- org.springframework.boot.autoconfigure.security.oauth2.client.reactive.ReactiveOAuth2ClientAutoConfiguration | ||
cloud: | ||
gateway: | ||
# The whole list need to be overridden to remove CustomTokenRelayGatewayFilter | ||
default-filters: | ||
- RemoveResponseHeader=Expires | ||
- RemoveRequestHeader=cookie | ||
- RemoveRequestHeader=x-xsrf-token | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Dokumentation | ||
|
||
## Architektur | ||
|
||
![Architektur](img/DAVe_Architektur_LS2.drawio.png) | ||
|
||
## Technisches Setup | ||
Zum schnellen Starten eines vollständig lauffähigen DAVe Datenportal ist im Verzeichnis "stack" ein docker-compose-Skript verfügbar. | ||
Dieses fährt folgende Komponenten hoch: | ||
* ElasticSearch | ||
* Kibana | ||
* H2-Datenbank | ||
* DAVe-Backend | ||
* DAVe-Frontend (Datenportal) | ||
|
||
Die Security-Funktionen für Login etc. sind dabei ausgeschaltet. | ||
|
||
Mit dem voreingestellten Profil "sample" wird eine Beispiel-Zählstelle mit einer Beispielzählung in die Datenbank bzw. den Index eingespielt. | ||
|
||
Das Frontend ist nach dem Hochfahren unter "http://localhost:8082" verfügbar. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: dave | ||
services: | ||
|
||
dave-frontend: | ||
container_name: dave-frontend | ||
image: itatm/dave-frontend:latest | ||
environment: | ||
- SPRING_PROFILES_ACTIVE=docker,no-security | ||
- SSO_BASE_URL=http://sso.de | ||
ports: | ||
- "8082:8082" | ||
pull_policy: always | ||
|
||
dave-backend: | ||
container_name: dave-backend | ||
image: itatm/dave-backend:latest | ||
environment: | ||
- SPRING_PROFILES_ACTIVE=docker,no-security,sample | ||
- elasticsearch.host=dave-elasticsearch | ||
- SSO_BASE_URL=http://sso.de | ||
ports: | ||
- "39146:39146" | ||
pull_policy: always | ||
depends_on: | ||
- elasticsearch | ||
restart: on-failure | ||
|
||
elasticsearch: | ||
container_name: dave-elasticsearch | ||
image: bitnami/elasticsearch:7.17.14 | ||
environment: | ||
- discovery.type=single-node | ||
- path.data=%USERPROFILE%/dave/data/mydatafile | ||
volumes: | ||
- c:/path/to/mydata:/usr/share/elasticsearch/data | ||
ports: | ||
- 9200:9200 | ||
|
||
kibana: | ||
container_name: dave-kibana | ||
image: bitnami/kibana:7.17.14 | ||
ports: | ||
- 5601:5601 | ||
|