From 11e4ced6ddfb9fcb02a9930687581d0d13ee2101 Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Thu, 30 May 2019 14:25:14 +1000 Subject: [PATCH] feat: allow Pact Broker application port to be configured via an environment variable Closes: https://github.com/pact-foundation/pact-broker-docker/issues/1 --- Dockerfile | 5 +++-- README.md | 3 ++- pact_broker/entrypoint.sh | 3 +++ 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100755 pact_broker/entrypoint.sh diff --git a/Dockerfile b/Dockerfile index 8f7587e..6a3b5f5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,8 @@ COPY pact_broker $HOME/ # Start Puma ENV RACK_ENV=production +ENV PACT_BROKER_PORT=9292 USER ruby -EXPOSE 9292 -ENTRYPOINT ["bundle", "exec", "puma"] +EXPOSE $PACT_BROKER_PORT +ENTRYPOINT ["./entrypoint.sh"] CMD ["config.ru"] diff --git a/README.md b/README.md index 6b1b52b..1c08e9e 100644 --- a/README.md +++ b/README.md @@ -69,9 +69,10 @@ Set the environment variable `PACT_BROKER_LOG_LEVEL` to one of `DEBUG`, `INFO`, ## Other environment variables +* PACT_BROKER_PORT - the port that the Pact Broker application runs on. Defaults to 9292. +* PACT_BROKER_DISABLE_SSL_VERIFICATION - `false` by default, may be set to `true`. * PACT_BROKER_BASE_EQUALITY_ONLY_ON_CONTENT_THAT_AFFECTS_VERIFICATION_RESULTS - `true` by default, may be set to `false`. * PACT_BROKER_ORDER_VERSIONS_BY_DATE - `true` by default, may be set to `false`. -* PACT_BROKER_DISABLE_SSL_VERIFICATION - `false` by default, may be set to `true`. ## General Pact Broker configuration and usage diff --git a/pact_broker/entrypoint.sh b/pact_broker/entrypoint.sh new file mode 100755 index 0000000..8c2799c --- /dev/null +++ b/pact_broker/entrypoint.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +bundle exec puma --port $PACT_BROKER_PORT