These changes allow to configure the URL of the server and repository services via runtime environment variables:
the URL of the server and repository can be defined with the $SERVER_URL and $REPOSITORY_SERVER_URL environment variables
the Docker ui-entrypoint.sh is used to insert a piece of script in the index.html of the select form. This script uses the value of $SERVER_URL and $REPOSITORY_SERVER_URL to set corresponding custom variable in the global window object
the React code can access these values inside the window object
the URLs will be set to those values, if the environment variable are defined, and to the values assigned at build time to $REACT_APP_SERVER_URL and $REACT_APP_REPOSITORY_SERVER_URL (respectively) otherwise.
Related issue(s):
Fixes #20
Notes for reviewer:
This is code is already running in the POC server (pointed to by Hashscan staging).
Description:
These changes allow to configure the URL of the server and repository services via runtime environment variables:
Related issue(s):
Fixes #20
Notes for reviewer:
This is code is already running in the POC server (pointed to by Hashscan staging).