Job Manager
Prerequisites
Go (v1.23.3 or higher)
MongoDB
Docker
Building and Running Locally
Clone the repository:
git clone https://github.com/yourusername/Job-Manager-Adapter.git
cd Job-Manager-Adapter/bpp/backend
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>
Start the development server:
export $(cat .env | xargs) && go run main.go
The server should now be running at
http://localhost:8080
.
Deploying Using Docker
Build the Go program
go build -o bpp main.go
Update the Makefile
DOCKER_REGISTRY ?= <docker-registry>
DOCKER_REPO ?= <docker-repo>
DOCKER_IMAGE ?= bpp
DOCKER_TAG ?= <image-tag>
Build the docker image
make build-amd64
Run the docker image container
docker run --env-file ./.env -p 8080:8080 <docker-repo>/bpp:<image-tag>
Last updated
Was this helpful?