Job Manager

Prerequisites

  • Go (v1.23.3 or higher)

  • MongoDB

  • Docker

Building and Running Locally

  1. Clone the repository:

git clone https://github.com/yourusername/Job-Manager-Adapter.git
cd Job-Manager-Adapter/bpp/backend
  1. Create a .env file in the root directory and add your environment variables.

DB_SERVER=<mongo-db-server-address>
DB_USER=<mongo-db-username>
DB_PASSWORD=<mongo-db-password>
BPP_ID=<bpp-id>
BPP_URI=<bpp-uri>
  1. Start the development server:

export $(cat .env | xargs) && go run main.go
  1. The server should now be running at http://localhost:8080.

Deploying Using Docker

  1. Build the Go program

go build -o bpp main.go
  1. Update the Makefile

DOCKER_REGISTRY ?= <docker-registry>
DOCKER_REPO ?= <docker-repo>
DOCKER_IMAGE ?= bpp
DOCKER_TAG ?= <image-tag>
  1. Build the docker image

make build-amd64
  1. Run the docker image container

docker run --env-file ./.env -p 8080:8080 <docker-repo>/bpp:<image-tag>

Last updated

Was this helpful?