Skip to content

Commit bea31d5

Browse files
authored
fix: Enable port changes for Docker image using the PORT variable (OHIF#2016)
1 parent 48ecbc2 commit bea31d5

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ if [ -n "$CLIENT_ID" ] || [ -n "$HEALTHCARE_API_ENDPOINT" ]
2828
cp /usr/share/nginx/html/google.js /usr/share/nginx/html/app-config.js
2929
fi
3030

31+
if [ -n "${PORT}" ]
32+
then
33+
echo "Changing port to ${PORT}..."
34+
sed -i -e "s/listen 80/listen ${PORT}/g" /etc/nginx/conf.d/default.conf
35+
fi
36+
3137
echo "Starting Nginx to serve the OHIF Viewer..."
3238

3339
exec "$@"

0 commit comments

Comments
 (0)