Skip to content

Commit

Permalink
[kbss-cvut/termit-ui#528] Modify configuration to allow integration o…
Browse files Browse the repository at this point in the history
…f TermIt and OntoGrapher.
  • Loading branch information
ledsoft committed Oct 23, 2024
1 parent 79cdc14 commit 78c7d21
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 23 deletions.
5 changes: 4 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ services:
REPOSITORY_USERNAME: ${GDB_USERNAME}
REPOSITORY_PASSWORD: ${GDB_PASSWORD}
DB_SERVER_CONTEXT: http://onto.fel.cvut.cz/ontologies/application/termit/users
USER_TYPE: http://onto.fel.cvut.cz/ontologies/application/termit/pojem/uživatel-termitu
VOCABULARY_USER_TYPE: http://onto.fel.cvut.cz/ontologies/application/termit/pojem/uživatel-termitu
ADD_ACCOUNTS: false
REALM_ID: termit
restart: always
Expand Down Expand Up @@ -93,6 +93,8 @@ services:
TERMIT_TEXTANALYSIS_URL: http://annotace-server:8080/annotate?enableKeywordExtraction=true
TERMIT_LANGUAGE_TYPES_SOURCE: /tmp/z-sgov-glosář.ttl
TERMIT_SECURITY_PROVIDER: oidc
TERMIT_URL: ${URL}${ROOT}
TERMIT_MODELINGTOOLURL: ${URL}${ROOT}/ontographer
SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_ISSUERURI: ${URL}${ROOT}/sluzby/auth/realms/termit
SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_JWKSETURI: http://auth-server:8080/realms/termit/protocol/openid-connect/certs
volumes:
Expand All @@ -104,6 +106,7 @@ services:
- termit-db-server
environment:
SERVER_PORT: 8080
PROXY_URL: ${URL}${ROOT}/sluzby/db-proxy
PROXY_GRAPHDB_URL: http://termit-db-server:7200
PROXY_GRAPHDB_USERNAME: ${GDB_USERNAME}
PROXY_GRAPHDB_PASSWORD: ${GDB_PASSWORD}
Expand Down
46 changes: 24 additions & 22 deletions nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,25 @@ http {
add_header Access-Control-Allow-Origin *;

location ${ROOT}/sluzby/auth {
return 302 ${ORIGIN}/${ROOT}/sluzby/auth/;
}

location ${ROOT}/sluzby/auth/ {
proxy_pass http://auth-server:8080/;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Forwarded-Port $http_x_forwarded_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Cookie $http_cookie;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

# Increase buffer sizes to handle large headers sent by Keycloak and its clients
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
}
return 302 ${ORIGIN}/${ROOT}/sluzby/auth/;
}

location ${ROOT}/sluzby/auth/ {
proxy_pass http://auth-server:8080/;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Forwarded-Port $http_x_forwarded_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Cookie $http_cookie;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

# Increase buffer sizes to handle large headers sent by Keycloak and its clients
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
}

location = ${ROOT}/sluzby/db-server {
return 302 ${ORIGIN}${ROOT}/sluzby/db-server/;
Expand All @@ -51,7 +51,7 @@ http {
}

location = ${ROOT}/ontographer {
return 302 ${ORIGIN}${ROOT}/ontographer/;
return 302 ${ORIGIN}${ROOT}/ontographer/$is_args$args;
}

location ${ROOT}/ontographer/ {
Expand All @@ -61,8 +61,8 @@ http {
}

location = ${ROOT}/sluzby/server {
return 302 ${ORIGIN}${ROOT}/sluzby/termit/;
}
return 302 ${ORIGIN}${ROOT}/sluzby/termit/;
}

location ${ROOT}/sluzby/server/ {
proxy_http_version 1.1;
Expand All @@ -81,6 +81,8 @@ http {
location ${ROOT}/sluzby/db-proxy/ {
proxy_pass http://db-server-proxy:8080/gdb-proxy/;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Prefix ${ROOT}/sluzby/db-proxy/;
proxy_set_header X-Forwarded-Port ${PORT};

proxy_http_version 1.1;
proxy_set_header "Connection" "";
Expand Down

0 comments on commit 78c7d21

Please sign in to comment.