fix: Enable port changes for Docker image using the PORT variable (#2016)

This commit is contained in:
Nicolas Byl 2020-09-30 19:55:28 +02:00 committed by GitHub
parent 48ecbc261a
commit bea31d5fec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,6 +28,12 @@ if [ -n "$CLIENT_ID" ] || [ -n "$HEALTHCARE_API_ENDPOINT" ]
cp /usr/share/nginx/html/google.js /usr/share/nginx/html/app-config.js
fi
if [ -n "${PORT}" ]
then
echo "Changing port to ${PORT}..."
sed -i -e "s/listen 80/listen ${PORT}/g" /etc/nginx/conf.d/default.conf
fi
echo "Starting Nginx to serve the OHIF Viewer..."
exec "$@"