-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Expose the log level of the gateway server
* Dockerfile-gateway * Fixes the UID to avoid warning that id should be > 1000 * Configures use of a gateway.sh script as the CMD to allow for customising of node command line * gateway.sh * Updates the log level in the env.product file * Due to permissions, cannot sed update in-place but send to /tmp then redirect back * Executes the node command line
- Loading branch information
1 parent
c25f14f
commit a53192c
Showing
3 changed files
with
46 additions
and
3 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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/sh | ||
|
||
# Fail on error and undefined vars | ||
set -eu | ||
|
||
export HAWTIO_ONLINE_GATEWAY_LOG_LEVEL="${HAWTIO_ONLINE_GATEWAY_LOG_LEVEL:-info}" | ||
|
||
HAWTIO_ONLINE_GATEWAY_ENV_FILE="/opt/hawtio-online-gateway/env.product" | ||
|
||
if [ -f "${HAWTIO_ONLINE_GATEWAY_ENV_FILE}" ]; then | ||
cp ${HAWTIO_ONLINE_GATEWAY_ENV_FILE} /tmp | ||
sed -i -e "s/^LOG_LEVEL.*/LOG_LEVEL=${HAWTIO_ONLINE_GATEWAY_LOG_LEVEL}/" /tmp/env.product | ||
cat /tmp/env.product > ${HAWTIO_ONLINE_GATEWAY_ENV_FILE} | ||
fi | ||
|
||
node \ | ||
--enable-source-maps \ | ||
--env-file=${HAWTIO_ONLINE_GATEWAY_ENV_FILE} \ | ||
/opt/hawtio-online-gateway/gateway-api.js |