OHIF custom url for docker container behind nginx reverse proxy

not a request for help, just FYI in case this helps anyone else

hosting OHIF docker container behind nginx reverse proxy at non-root location

  • was experiencing 404 errors
  • using OHIF 3.8

in addition to the recommendations at Custom URL Access/Build | OHIF
also needed to update platform\app\package.json as per Change PUBLIC_URL inside container · Issue #2234 · OHIF/Viewers · GitHub

“scripts”: {
“build:viewer”: “cross-env PUBLIC_URL=/[non-root location]/ NODE_ENV=production yarn run build”,

}

guessing this could also have been fixed via OHIF Dockerfile, e.g.

ENV REACT_APP_PUBLIC_URL=/[non-root location]/
or maybe
ENV PUBLIC_URL=/[non-root location/

but didn’t try it out

Follow this guide Docker | OHIF