Skip to content

Deploying the Backend

Ashwin Date edited this page Apr 21, 2022 · 1 revision

Below is the list of activities / pre-requisites the deployer needs to do, to deploy the backend

Set up A VM to run the backend service

Optionally a Load Balancer in front of the VM

Deployer needs to have their own API or database for all the entities

Create auth service

Deployer needs to have a Open ID compatible authentication provider (Kelaycloak, FusionAuth are some Open Source options)

Adapter creation

Adapters to be written to connect to the backend to the deployer's API or database

Get code

Get the latest code from shiksha-platform/backend

git clone https://github.com/shiksha-platform/backend-v2.git

Build image

Once adapters are written, build an image using the provided Dockerfile (TBD : externalise the adapter folder so that deployers an use a pre-built image and mount the adapter folder)

docker build . --file Dockerfile --tag shiksha-backend:$(date +%s) 

Deploy the image in docker

Use the provided docker compose file to run the service

docker-compose up

To verify if the service is running, run the /health endpoint