Skip to content

Commit

Permalink
OZ-573: Switch to openmrs-core docker image + enable oauth2 at start …
Browse files Browse the repository at this point in the history
…time OpenMRS
  • Loading branch information
corneliouzbett committed Nov 28, 2024
1 parent ee45909 commit d4717a5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
6 changes: 1 addition & 5 deletions bundled-docker/openmrs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
FROM openmrs/openmrs-reference-application-3-backend:nightly

# Remove modules & configurations from OpenMRS Reference Application
RUN find /openmrs/distribution/openmrs_modules -mindepth 1 -delete || true
RUN find /openmrs/distribution/openmrs_config -mindepth 1 -delete || true
FROM openmrs/openmrs-core:2.6.7

# Add modules & configurations for the ozone distribution
ADD distro/binaries/openmrs/modules /openmrs/distribution/openmrs_modules
Expand Down
3 changes: 2 additions & 1 deletion docker-compose-openmrs-sso.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ services:
openmrs:
environment:
KEYCLOAK_URL: ${SERVER_SCHEME}://${KEYCLOAK_HOSTNAME}
OAUTH2_ENABLED: ${ENABLE_SSO}
volumes:
- "${OPENMRS_PROPERTIES_PATH}/oauth2.properties:/openmrs/data/oauth2.properties"
- "./openmrs/tomcat/server.xml:/usr/local/tomcat/conf/server.xml"

frontend:
Expand All @@ -14,6 +14,7 @@ services:

env-substitution:
environment:
- OAUTH2_ENABLED=${ENABLE_SSO}
- HOST_URL=${SERVER_SCHEME}://${O3_HOSTNAME}
- KEYCLOAK_AUTH_SERVER_URL=${SERVER_SCHEME}://${KEYCLOAK_HOSTNAME}
- OPENMRS_CLIENT_SECRET=${OPENMRS_CLIENT_SECRET}
4 changes: 3 additions & 1 deletion docker-compose-openmrs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@ services:
OMRS_CONFIG_CONNECTION_USERNAME: ${OPENMRS_DB_USER:-openmrs}
OMRS_CONFIG_CONNECTION_PASSWORD: ${OPENMRS_DB_PASSWORD:-openmrs}
HOST_URL: https://${O3_HOSTNAME}
OAUTH2_ENABLED: ${ENABLE_SSO}
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8080/openmrs/health/started" ]
interval: 10s
timeout: 5s
retries: 48
start_period: 120s
image: openmrs/openmrs-reference-application-3-backend:3.1.1
image: openmrs/openmrs-core:2.6.7
labels:
traefik.enable: "true"
traefik.http.routers.openmrs.rule: "Host(`${O3_HOSTNAME}`) && PathPrefix(`/openmrs`)"
Expand All @@ -44,6 +45,7 @@ services:
- "${OPENMRS_CONFIG_CHECKSUMS_PATH:-openmrs-config-checksums}:/openmrs/data/configuration_checksums"
- "${OPENMRS_PROPERTIES_PATH}:/etc/properties/"
- "${OPENMRS_PROPERTIES_PATH}/fhirproxy.properties:/openmrs/data/fhirproxy/config.properties"
- "${OPENMRS_PROPERTIES_PATH}/oauth2.properties:/openmrs/data/oauth2.properties"

# OpenMRS 3 Frontend
frontend:
Expand Down

0 comments on commit d4717a5

Please sign in to comment.