Skip to content

Commit e375a4a

Browse files
authored
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
1 parent 7f4d71e commit e375a4a

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

.docker/Viewer-v2.x/entrypoint.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ if [ ! -z "$CLIENT_ID" ]
77
echo $CLIENT_ID
88
echo "Updating config..."
99

10-
# - Use SED to replace the CLIENT_ID that is currently in public/config/google.js
11-
sed -i -e "s/YOURCLIENTID.apps.googleusercontent.com/$CLIENT_ID/g" /usr/share/nginx/html/config/google.js
10+
# - Use SED to replace the CLIENT_ID that is currently in google.js
11+
sed -i -e "s/YOURCLIENTID.apps.googleusercontent.com/$CLIENT_ID/g" /usr/share/nginx/html/google.js
1212

13-
# - Copy public/config/google.js to overwrite public/config/default.js
14-
cp /usr/share/nginx/html/config/google.js /usr/share/nginx/html/config/default.js
13+
# - Copy google.js to overwrite app-config.js
14+
cp /usr/share/nginx/html/google.js /usr/share/nginx/html/app-config.js
1515
fi
1616

1717
echo "Starting Nginx to serve the OHIF Viewer..."

platform/viewer/.webpack/webpack.pwa.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ module.exports = (env, argv) => {
7171
// Ignore our configuration files
7272
ignore: ['config/*', 'html-templates/*', '.DS_Store'],
7373
},
74+
// Short term solution to make sure GCloud config is available in output
75+
// for our docker implementation
76+
{
77+
from: `${PUBLIC_DIR}/config/google.js`,
78+
to: `${DIST_DIR}/google.js`,
79+
},
7480
// Copy over and rename our target app config file
7581
{
7682
from: `${PUBLIC_DIR}/${APP_CONFIG}`,

0 commit comments

Comments
 (0)