ohif-viewer/.docker/Viewer-v2.x/entrypoint.sh
Danny Brown e375a4ab11
fix: google cloud support w/ docker (via env var) (#958)
* fix: make sure google config is in output

* fix: update config sub to use new paths and file names
2019-09-26 14:08:44 -04:00

20 lines
597 B
Bash

#!/bin/bash
# If CLIENT_ID is specified, use the google.js configuration with the modified ID
if [ ! -z "$CLIENT_ID" ]
then
echo "Google Cloud Healthcare $CLIENT_ID has been provided: "
echo $CLIENT_ID
echo "Updating config..."
# - Use SED to replace the CLIENT_ID that is currently in google.js
sed -i -e "s/YOURCLIENTID.apps.googleusercontent.com/$CLIENT_ID/g" /usr/share/nginx/html/google.js
# - Copy google.js to overwrite app-config.js
cp /usr/share/nginx/html/google.js /usr/share/nginx/html/app-config.js
fi
echo "Starting Nginx to serve the OHIF Viewer..."
exec "$@"