-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added logs to
start-envoy.sh
to print the env values, and the proce…
…ssed config in a pretty format. also, fixed the override of the docker-compose.yaml and improvements to the documentation with the latest changes Signed-off-by: Alfredo Gutierrez <[email protected]>
- Loading branch information
1 parent
121aeb6
commit 970eff8
Showing
3 changed files
with
67 additions
and
25 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 |
---|---|---|
@@ -1,7 +1,38 @@ | ||
#!/bin/sh | ||
|
||
# Set default values for environment variables if they are not already set | ||
export SERVICE_TYPE=${SERVICE_TYPE:-LOGICAL_DNS} | ||
export SERVICE_ADDRESS=${SERVICE_ADDRESS:-host.docker.internal} | ||
export SERVICE_PORT=${SERVICE_PORT:-8020} | ||
export ENVOY_ADMIN_PORT=${ENVOY_ADMIN_PORT:-15000} | ||
export PROXY_PORT=${PROXY_PORT:-10000} | ||
export CLIENT_ID=${CLIENT_ID:-htg-auth-layer} | ||
export TOKEN_INTROSPECTION_URL=${TOKEN_INTROSPECTION_URL:-http://host.docker.internal:8080/realms/HederaTheGraph/protocol/openid-connect/token/introspect} | ||
|
||
# print the environment variables | ||
echo "----------------------------------------" | ||
echo "--- Environment variables: ---" | ||
echo "----------------------------------------" | ||
echo "SERVICE_TYPE: $SERVICE_TYPE" | ||
echo "SERVICE_ADDRESS: $SERVICE_ADDRESS" | ||
echo "SERVICE_PORT: $SERVICE_PORT" | ||
echo "ENVOY_ADMIN_PORT: $ENVOY_ADMIN_PORT" | ||
echo "PROXY_PORT: $PROXY_PORT" | ||
echo "CLIENT_ID: $CLIENT_ID" | ||
echo "CLIENT_SECRET: $CLIENT_SECRET" | ||
echo "TOKEN_INTROSPECTION_URL: $TOKEN_INTROSPECTION_URL" | ||
echo "----------------------------------------" | ||
|
||
|
||
# Use envsubst to replace environment variables in the template | ||
envsubst < /etc/envoy/configs/envoy-auth-template.yaml > /etc/envoy/envoy-config.yaml | ||
# cat /etc/envoy/envoy-config.yaml | ||
|
||
# Print the processed configuration | ||
echo "----------------------------------------" | ||
echo "--- Processed Envoy configuration: ---" | ||
echo "----------------------------------------" | ||
cat /etc/envoy/envoy-config.yaml | ||
echo "----------------------------------------" | ||
|
||
# Now start Envoy with the processed configuration | ||
envoy -c /etc/envoy/envoy-config.yaml |