-
Notifications
You must be signed in to change notification settings - Fork 19
Use relative paths in LFH result messages #428
Conversation
[ "$(uname -s)" == "Darwin" ] && export LFH_KONG_LFHHOST="host.docker.internal" | ||
export LFH_KONG_CONNECT_HOST="localhost" | ||
[ "$(uname -s)" == "Darwin" ] && export LFH_KONG_CONNECT_HOST="host.docker.internal" | ||
export LFH_KONG_ORTHANC_HOST=${LFH_KONG_CONNECT_HOST} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We now need to connect to two different containers from Kong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we will always need the default compose config and kong we could set a "default" compose file
COMPOSE_FILE=docker-compose.yml:docker-compose.kong-migration.yml
# then do the case statement
export COMPOSE_FILE=${COMPOSE_FILE}:<whatever>
That may not be much of an improvement though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting. It may be a wash in terms of complexity, though. We can always make that change later.
lfhmllp=${LFH_CONNECT_MLLP_PORT} | ||
kongmllp=${LFH_KONG_MLLP_PORT} | ||
connect_host=${LFH_KONG_CONNECT_HOST:-${LFH_CONNECT_SERVICE_NAME}} | ||
orthanc_host=${LFH_KONG_ORTHANC_HOST:-${LFH_ORTHANC_SERVICE_NAME}} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LFH_CONNECT_SERVICE_NAME is used by the OCI script, while compose uses LFH_KONG_CONNECT_HOST. This single configure-kong.sh script handles both cases.
@@ -66,18 +66,6 @@ function wait_for_cmd() { | |||
return 1 | |||
} | |||
|
|||
function add_http_route() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
[ "$(uname -s)" == "Darwin" ] && export LFH_KONG_LFHHOST="host.docker.internal" | ||
export LFH_KONG_CONNECT_HOST="localhost" | ||
[ "$(uname -s)" == "Darwin" ] && export LFH_KONG_CONNECT_HOST="host.docker.internal" | ||
export LFH_KONG_ORTHANC_HOST=${LFH_KONG_CONNECT_HOST} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we will always need the default compose config and kong we could set a "default" compose file
COMPOSE_FILE=docker-compose.yml:docker-compose.kong-migration.yml
# then do the case statement
export COMPOSE_FILE=${COMPOSE_FILE}:<whatever>
That may not be much of an improvement though.
This PR contains a number of changes:
Updated the data field of the result of a POST to the Orthanc server to include the relative location of the image as stored in Orthanc, e.g.: instances/de11d211-6fcb8f9e-509b1519-5acd5d8e-7d127482/preview
Added an
/instances
Orthanc service route to Kong that goes directly to Orthanc (the first non-connect API in Kong). This allows a REST call to Kong to retrieve original image information stored in Orthanc (with the Orthanc username and password for basic auth).Consolidated the configure-kong.sh script under container-support/oci. The compose/configure-kong.sh sources ../oci/configure-kong.sh.
Removed all references to external host ip. e.g. LFH_CONNECT_EXTERNAL_HOST_IP: "127.0.0.1" because all relative urls can now be evaluated against kong.
Tested with dev and server compose profiles on amd64 and oci script on s390x.