Build and Deploy Setup

A. Running Locally without Docker

Clone repository

# Fork and Clone the Repository
git clone git@github.com:PSMRI/ubi-eligibility-sdk.git
cd ubi-eligibility-sdk

# Check out the main branch
git checkout main

Install Dependencies

# Install dependencies
npm install

Optional - Set up Git hooks

# Set up Git hooks (Husky)
npm run prepare
git config core.hooksPath .husky/_
chmod +x .husky/pre-commit
chmod +x .husky/commit-msg

Create / Update .env

Ensure you have created and updated .env with required variables

Running in Dev Mode

npm run start

The backend will be available at: 👉 http://localhost:3011

B. Running with Docker

Create / Update .env

Ensure you have created and updated .env with required variables

Build Docker Image Run Steps

Using Dockerfile from the repo code, you can generate an image

# Build the Docker Image
docker build -t ubi-eligibility-sdk .

Example .env for docker

The docker-compose.yml requires a separate file .env

# SERVER CONFIGURATION
PORT=3011
HOST=0.0.0.0

Use Image in docker-compose

Use generated images in docker-compose.yml

# Run the Container
docker-compose up -d

Last updated

Was this helpful?