Skip to content

Commit

Permalink
make default favicon overridable
Browse files Browse the repository at this point in the history
  • Loading branch information
tendomart committed Sep 25, 2024
1 parent 4b1ae90 commit 5553c29
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ services:
environment:
SPA_PATH: /openmrs/spa
API_URL: /openmrs
OMRS_PAGE_TITLE: UVI-EMR
OMRS_FAVICON:
OMRS_PAGE_TITLE:
OMRS_FAVICON: $SPA_PATH/frontend/favicon.ico
SPA_CONFIG_URLS: /openmrs/spa/config-core_demo.json
SPA_DEFAULT_LOCALE:
healthcheck:
Expand Down
5 changes: 3 additions & 2 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ FROM --platform=$BUILDPLATFORM node:18-alpine as dev

ARG APP_SHELL_VERSION=next
ARG OMRS_PAGE_TITLE=OpenMRS
ARG OMRS_FAVICON=/frontend/favicon.ico

RUN mkdir -p /app
WORKDIR /app
Expand All @@ -15,7 +16,7 @@ COPY spa-build-config.json .

ARG CACHE_BUST
RUN npx --legacy-peer-deps openmrs@${APP_SHELL_VERSION:-next} assemble --manifest --mode config --config spa-assemble-config.json --target ./spa
RUN npx --legacy-peer-deps openmrs@${APP_SHELL_VERSION:-next} build --build-config spa-build-config.json --target ./spa --page-title ${OMRS_PAGE_TITLE:-UVI-EMR}
RUN npx --legacy-peer-deps openmrs@${APP_SHELL_VERSION:-next} build --build-config spa-build-config.json --target ./spa --page-title ${OMRS_PAGE_TITLE:-UVI-EMR0000}

RUN if [ ! -f ./spa/index.html ]; then echo 'Build failed. Please check the logs above for details. This may have happened because of an update to a library that OpenMRS depends on.'; exit 1; fi

Expand All @@ -40,4 +41,4 @@ COPY nginx.conf /etc/nginx/nginx.conf
COPY --from=dev /app/spa /usr/share/nginx/html
COPY config-core_demo.json /usr/share/nginx/html

CMD ["/usr/local/bin/startup.sh"]
CMD ["nodeman", "/usr/local/bin/startup.sh"]
Binary file added frontend/favicon.ico
Binary file not shown.
4 changes: 3 additions & 1 deletion frontend/spa-build-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@
"importmap": "$SPA_PATH/importmap.json",
"routes": "$SPA_PATH/routes.registry.json",
"supportOffline": false,
"pageTitle": "UVI-EMR"
"pageTitle": "$OMRS_PAGE_TITLE",
"favicon":"$SPA_PATH/frontend/favicon.ico"

}

0 comments on commit 5553c29

Please sign in to comment.