diff --git a/docker-compose.yml b/docker-compose.yml index e0d1340f4..0ae45851e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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: diff --git a/frontend/Dockerfile b/frontend/Dockerfile index ca2ccdc9d..bcf060b66 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -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 @@ -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 @@ -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"] diff --git a/frontend/favicon.ico b/frontend/favicon.ico new file mode 100644 index 000000000..f6c805d7c Binary files /dev/null and b/frontend/favicon.ico differ diff --git a/frontend/spa-build-config.json b/frontend/spa-build-config.json index 68c3ce8f9..52eadcd8e 100644 --- a/frontend/spa-build-config.json +++ b/frontend/spa-build-config.json @@ -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" + }