Skip to content

Commit

Permalink
OZ-698: O3 frontend config files served in configs/ instead of `ozo…
Browse files Browse the repository at this point in the history
…ne/` (#116)
  • Loading branch information
corneliouzbett authored Oct 24, 2024
1 parent b12758c commit 5c259e7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ OPENMRS_DB_NAME=openmrs
#
# OpenMRS frontend
#
SPA_CONFIG_URLS=/openmrs/spa/ozone/ozone-frontend-config.json
SPA_CONFIG_URLS=/openmrs/spa/configs/ozone-frontend-config.json
SPA_DEFAULT_LOCALE=en

# OpenMRS frontend and backend Docker image tag
Expand Down
4 changes: 2 additions & 2 deletions bundled-docker/frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM openmrs/openmrs-reference-application-3-frontend:nightly
ADD distro/binaries/openmrs/frontend /usr/share/nginx/html
ADD distro/configs/openmrs/frontend_config /usr/share/nginx/html/ozone
ADD distro/configs/openmrs/frontend_config /usr/share/nginx/html/configs
RUN mkdir -p /app
WORKDIR /app
COPY bundled-docker/frontend/startup.sh /app
RUN chmod +x /app/startup.sh
CMD ["/app/startup.sh"]
CMD ["/app/startup.sh"]
6 changes: 2 additions & 4 deletions bundled-docker/frontend/startup.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#!/bin/sh
set -e
# if [ -f "/usr/share/nginx/html/ozone/ozone-frontend-config.json" ]; then
# envsubst < "/usr/share/nginx/html/ozone/ozone-frontend-config.json" | sponge "/usr/share/nginx/html/ozone/ozone-frontend-config.json"
# fi
for f in /usr/share/nginx/html/ozone/*.json; do

for f in /usr/share/nginx/html/configs/*.json; do
echo "processing===> $f";
envsubst < $f | sponge $f;
done
Expand Down
2 changes: 1 addition & 1 deletion docker-compose-openmrs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ services:
restart: unless-stopped
volumes:
- "${OPENMRS_FRONTEND_BINARY_PATH}:/usr/share/nginx/html"
- "${OPENMRS_FRONTEND_CONFIG_PATH}:/usr/share/nginx/html/ozone"
- "${OPENMRS_FRONTEND_CONFIG_PATH}:/usr/share/nginx/html/configs"

mysql:
environment:
Expand Down

0 comments on commit 5c259e7

Please sign in to comment.