Skip to content

Commit

Permalink
[#230] Fix possibility to replace record-manager-server instance from…
Browse files Browse the repository at this point in the history
… IDE
  • Loading branch information
blcham committed Nov 7, 2024
1 parent 3f5e8d8 commit 12c20da
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion deploy/keycloak-auth/.env
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ RECORD_MANAGER_APP_TITLE=Record Manager

APP_LANGUAGE=en

# Internal address where record manager server runs which should be accessible from inside of docker. Use `http://host.docker.internal` to access http://localhost of the host computer.
# Internal address where record manager server runs which should be accessible from inside of docker. To access http://localhost of the host computer use value "http://host.docker.internal".
# See "extra-hosts" within docker-compose file for more info.
#INTERNAL_RECORD_MANAGER_SERVER_SERVICE=http://host.docker.internal:8080
2 changes: 2 additions & 0 deletions deploy/keycloak-auth/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ services:
RECORD_MANAGER_PATH: "${RECORD_MANAGER_PATH:-/record-manager}"
ANALYTICS_PATH: "${ANALYTICS_PATH:-/statistics}"
INTERNAL_RECORD_MANAGER_SERVER_SERVICE: "${INTERNAL_RECORD_MANAGER_SERVER_SERVICE:-http://record-manager-server:8080}"
extra_hosts:
- "host.docker.internal:host-gateway" # support "http://host.docker.internal" for Linux (Windows/Mac works without it)

volumes:
- ./nginx/nginx.conf:/etc/nginx/templates/nginx.conf.template:ro
Expand Down
5 changes: 5 additions & 0 deletions deploy/keycloak-auth/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ http {

location /services/db-server/ {
proxy_pass http://db-server:7200/; # keep the trailing slash to cut off matched prefix

proxy_set_header Host $host;

# Ensure Location headers are rewritten properly as X-Forwarded-Port is ignored
proxy_redirect http://localhost/ ${APP_ORIGIN}/services/db-server/;
}

location /services/s-pipes/ {
Expand Down

0 comments on commit 12c20da

Please sign in to comment.