Setting up DIVOC development environment

Steps

Step 1: Install prerequisites and dependencies

  • Update package list - sudo apt-get update.

  • Install docker - sudo apt install docker.io.

  • Install docker-compose - sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose.

  • Install git - sudo apt install git.

  • For additional details on Docker, you can find the instructions here.

  • You can find the basic Docker Compose commands below: (DIVOC repo has docker-compose-vc-issuance.yml file which lists all the services required for VC Issuance)

- Starting services docker-compose -f docker-compose-vc-issuance.yml up.

- Restarting services docker-compose -f docker-compose-vc-issuance.yml restart.

- Checking the status of services docker-compose -f docker-compose-vc-issuance.yml ps.

- Monitoring service logs docker-compose -f docker-compose-vc-issuance.yml logs.

Step 2: Install DIVOC

  • Clone DIVOC repository onto your local machine - git clone https://github.com/egovernments/DIVOC.

  • Navigate to the DIVOC directory - cd DIVOC.

  • Configure DIVOC: Configurations are provided as environment variables and a default set of configurations is provided in the ‘.env.example’ file. Make a copy of this file named ‘.env’ that docker will pick up. Edit these configurations as per your need.

'cp .env.example .env'

Step 3: Start keycloak and kafka services in the detached mode.

docker-compose -f docker-compose-vc-issuance.yml up -d kafka keycloak
  • Verify the state of kafka and keycloak containers. If they are up and running, Other services can be started now in detached mode.

docker-compose -f docker-compose-vc-issuance.yml up -d
  • Verify the state of containers. All containers should be up.

  • Some services might fail to start because the dependent service may not be ready yet. Restarting the failed service should start it successfully in this case.

  • On Mac/Windows, services may crash with exit code:137, if sufficient memory is not set for docker. This can be changed in the Docker desktop preferences, resources tab, as shown here.

Step 4: To build docker images locally after making changes, run following commands make docker (Available within the individual micro services folder and at parent level folder as well).

docker-compose -f docker-compose-vc-issuance.yml up -d

Step 5: Explore DIVOC

  • The following are the routes to access local apps. The remaining routes can be found in nginx/nginx.conf.

AddressApplication

localhost

tenant-portal

localhost/vc-verification-app

Verification app

Last updated