Skip to content

Commit

Permalink
use port 8080 and 8081
Browse files Browse the repository at this point in the history
  • Loading branch information
icrc-fdeniger committed Jul 15, 2024
1 parent ea2b612 commit 7dff51c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This distribution is a customized version of https://github.com/openmrs/openmrs-
1. Copy the file `.env.default` to `.env`
2. Edit .env and provide default username, password
3. Start dockers with: `docker compose up -d --build`
4. Go to http://localhost
4. Go to http://localhost:8080
5. You should be redirected to Keycloak.
6. Sign in using a user selected from the provided list [keycloak/users.csv](./keycloak/users.csv) and the password defined in `.env`

Expand Down
9 changes: 5 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
- frontend
- backend
ports:
- "80:80"
- "8080:80"

frontend:
# image: ghcr.io/icrc/openmrs-distro-sso/openmrs-frontend-qa:latest
Expand Down Expand Up @@ -78,16 +78,17 @@ services:
build:
context: keycloak
ports:
- "8080:8080"
- "8081:8081"
environment:
KEYCLOAK_ADMIN: ${KC_ADMIN_USER}
KEYCLOAK_ADMIN_PASSWORD: ${KC_ADMIN_PASSWORD}
OMRS_OAUTH_CLIENT_SECRET: ${OMRS_OAUTH_CLIENT_SECRET}
USERS_DEFAULT_PASSWORD: ${USERS_DEFAULT_PASSWORD}
KC_HOSTNAME_STRICT: false
KC_HTTP_ENABLED: true
# KC_HOSTNAME: localhost
KC_HOSTNAME: 10.0.2.2
KC_HTTP_PORT: 8081
KC_HOSTNAME: localhost
# KC_HOSTNAME: 10.0.2.2
command: ["start-dev"]

volumes:
Expand Down
4 changes: 2 additions & 2 deletions keycloak/initialize-my-realm-and-add-users.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ REALM=${REALM:-main}
ANDROID_SDK_CLIENT_ID=${ANDROID_SDK_CLIENT_ID:-openmrs-fhir}
ANDROID_SDK_REDIRECT_URIS=${ANDROID_SDK_REDIRECT_URIS:-org.openmrs.android.fhir:/oauth2redirect}
OMRS_CLIENT_ID=${OMRS_CLIENT_ID:-openmrs}
OMRS_REDIRECT_URIS=${OMRS_REDIRECT_URIS:-http://localhost/*}
OMRS_FRONTCHANNEL_LOGOUT_URI=${OMRS_FRONTCHANNEL_LOGOUT_URI:-http://localhost/openmrs/ms/logout}
OMRS_REDIRECT_URIS=${OMRS_REDIRECT_URIS:-http://localhost:8080/*}
OMRS_FRONTCHANNEL_LOGOUT_URI=${OMRS_FRONTCHANNEL_LOGOUT_URI:-http://localhost:8080/openmrs/ms/logout}

sh /opt/keycloak/bin/kcadm.sh create realms -s realm="${REALM}" -s enabled=true -s sslRequired=none
echo "INFO: Created REALM ${REALM}"
Expand Down

0 comments on commit 7dff51c

Please sign in to comment.