Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Clone project to your development workspace

    Code Block
    git clone git@git.web-essentials.asia:hiv-tra-20/Distribution.git ~/dev/docker-projects/hiv/distribution
  • Navigate to your project

    Code Block
    cd ~/dev/docker-projects/hiv/distribution
    sudo chown -R ${USER}:${USER} .
  • Run script to set up

    Code Block
    chmod u+x local_setup/setup.sh
    ./local_setup/setup.sh

    Note: Actually, the script is trying to kill all conflict ports but sometimes it could not. So if there are conflict ports, you have to kill it first then rerun the script. Here is the command to kill the port in Linux: sudo kill $(sudo lsof -t -i:PORT_TO_FREE).

  • Verify installation by visit http://local-rehabilitation.wehost.asia with your Docker host on the browser.

Configure Keycloak

  • Try login through http://local-rehabilitation.wehost.asia/auth web browser from Docker with credentials from docker-compose.yml

    If it does not work, copy all content from file docker-compose-dev.yml (expose static port) to replace docker-compose.yml and restart all containers docker-compose up -d

    Re-try login through http://localhost:8080/auth/ with same credentials

  • Import and update Realm Settings

    1. Export Realm from Latest or Demo hi and hi-therapist

    2. Import those two Realm into your local running Keycloak

    3. Update Frontend URL of each Realm Settings to http://local-rehabilitation.wehost.asia/auth or http://localhost:8080/auth/ (depend on which URL you have logged in success)

  • Create default user to generate access token (DO NOT DELETE these users)

    Note: These users should have primary client roles: manager-users, query-groups, and query-users (Client Roles -> realm-management)

    1. Create hi_backend with password hi_backendDBPWD on hi Realm

    2. Create therapist_backend with password therapist_backendDBPWD on therapist Realm

...