Public Repository

Last pushed: 4 months ago
Short Description
Container for the Pact Broker
Full Description

Dockerised Pact Broker

Github: https://github.com/DiUS/pact_broker-docker

A docker container for the Pact Broker. The Pact Broker provides a repository for consumer driven contracts created using Pact libraries.

It:

  • solves the problem of how to share pacts between consumer and provider projects
  • allows you to [decouple your service release cycles][decouple]
  • provides API documentation that is guaranteed to be up-to date
  • shows you real examples of how your services interact
  • allows you to visualise the relationships between your services

Prerequisites

  • A running postgres database and the ability to connect to it

Getting Started

a. Setup the pact broker connection to the database through the use of the following environment variables
   * PACT_BROKER_DATABASE_USERNAME
   * PACT_BROKER_DATABASE_PASSWORD
   * PACT_BROKER_DATABASE_HOST
   * PACT_BROKER_DATABASE_NAME
Docker Pull Command
Owner
dius

Comments (4)
bethesque
2 years ago

Pact Broker application logs now available via docker logs.

bethesque
2 years ago

Ok, I've upgraded the image to use phusion/passenger-ruby as the base, it is accessible from the outside world on port 80 now. Still working on making the logs available via docker logs.

uglyog
2 years ago

@wayofthepie you are correct, the bind is missing from the CMD. I have requested the owners to correct this.

wayofthepie
2 years ago

Hi,

Running this image as is rejects any connections from outside the container:

$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ca0d88f95f15 dius/pact_broker:latest "/etc/service/app/ru 5 seconds ago Up 4 seconds 0.0.0.0:80->80/tcp pact-broker
9d159aa8409f postgres:9 "/docker-entrypoint. 3 days ago Up 58 minutes 0.0.0.0:5432->5432/tcp pact-postgres

$ wget localhost:80
--2015-05-18 14:53:49-- http://localhost/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:80... connected.
HTTP request sent, awaiting response... Read error (Connection reset by peer) in headers.
Retrying.

However updating the CMD to listen on any address works:

FROM dius/pact_broker
CMD /usr/local/bin/rackup -o 0.0.0.0 -p 80

$ wget localhost:80
--2015-05-18 14:56:37-- http://localhost/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 463 [application/hal+json]
Saving to: ‘index.html’
........

Is there a reason connections outside the container fail? Or am I missing a configuration option...

Thanks!