Versions Compared

Key

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

...

Local

...

Environment with Docker

  • Clone project to your development workspace

    Code Block
    git clone https://github.com/OpenTeleRehab/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 visiting site below:

Configure

...

Environment Variables

Code Block
cp ../admin-service/.env.example ../admin-service/.env
cp ../therapist-service/.env.example ../therapist-service/.env
cp ../patient-service/.env.example ../patient-service/.env

...

Edit vi ../therapist-service/.env by replacing value for KEYCLOAK_BACKEND_SECRET getting from hi-therapist Realm -> Clients

Migrate

...

Database Tables

Code Block
docker-compose run --rm admin_service php artisan migrate
docker-compose run --rm therapist_service php artisan migrate
docker-compose run --rm patient_service php artisan migrate

Access database via user interface: http://localhost:8060/

Enjoy your development on admin-web-app or therapist-web-app

Useful

...

Docker Command

  • Manually up docker

    Code Block
    docker-compose up -d
  • Manually kill running docker

    Code Block
    docker-compose kill

Key Generate

Code Block
cd ~/dev/docker-projects/hiv/admin-service && php artisan key:generate
cd ~/dev/docker-projects/hiv/therapist-service && php artisan key:generate
cd ~/dev/docker-projects/hiv/patient-service && php artisan key:generate

Import Translation Key

Code Block
cd ~/dev/docker-projects/hiv/distribution
docker-compose run --rm admin_service php artisan hi:import-default-translation

Import Service Authentication Backend User

Code Block
cd ~/dev/docker-projects/hiv/distribution
docker-compose run --rm admin_service php artisan hi:create-backend-user
docker-compose run --rm therapist_service php artisan hi:create-backend-user
docker-compose run --rm patient_service php artisan hi:create-backend-user

Rocket Chat Configuration

...