This is a simple alternative GUI for pact broker. It displays:
- environments
- all pacticipants deployed to environment
- pacticipants (all versions)
- pacticipant dependency graph
Note: at this moment GUI server is hardcoded to run on port 5000.
This step is required because default bridge network does not have DNS capabilities.
docker network create pact-network
If you are on amd64 platform:
docker run -e PACT_BROKER_DATABASE_ADAPTER=sqlite -e PACT_BROKER_DATABASE_NAME=my_db --name pact-broker --network pact-network -p 9292:9292 -d pactfoundation/pact-broker
If you are on arm64 or aarch64 platform:
docker run -e PACT_BROKER_DATABASE_ADAPTER=sqlite -e PACT_BROKER_DATABASE_NAME=my_db --name pact-broker --network pact-network -p 9292:9292 --platform linux/amd64 -d pactfoundation/pact-broker
Attempting to send requests to pact broker from a different origin will result in CORS error.
We need to mimic like our requests came from pact-broker origin (localhost:9292 or pact-broker:9292).
That is why we are using NGINX reverse proxy to forward requests from localhost:5000 to localhost:8972 and thus avoid CORS error.
Go into the config/nginx directory and run:
docker run --network=pact-network -p 5050:5000 --name pact-broker-proxy -v $PWD/nginx.conf:/etc/nginx/nginx.conf:ro -d nginx
Go to the project's root directory and run:
yarn dev
Go to the project's root directory and run:
docker build -f config/docker/Dockerfile . -t pact-broker-gui
docker run --network pact-network -p 5050:3000 -d pact-broker-gui