example/README.md in pact_broker-2.81.0 vs example/README.md in pact_broker-2.82.0

- old
+ new

@@ -1,8 +1,8 @@ # Run Pact Broker example -The configuration for this example should not be used in production. Either use the [Docker Pact Broker image][docker-pact-broker], or copy the [pact_broker directory][pact-broker-dir] from the Docker project as your starting point. Ensure you configure a web server/reverse proxy (such as Passenger/Nginx) in front of it (you can also copy the configuration for these from the Docker image.) +It is recommended to use the [Docker Pact Broker image][docker-pact-broker] for production use. Clone project ```bash git clone https://github.com/pact-foundation/pact_broker @@ -23,49 +23,42 @@ ``` Run Pact Broker ```bash -bundle exec rackup +bundle exec puma ``` +Now Pact Broker can be access locally at [http://localhost:9292](http://localhost:9292). + ## Run with postgres database -Uncomment `gem 'pg'` in the [Gemfile](Gemfile) +Create a postgres database -Comment out `gem 'sqlite3'` in the [Gemfile](Gemfile) - -Comment out the line with `DATABASE_CREDENTIALS = {adapter: "sqlite"...` in the [config.ru](config.ru#L9). - -Uncomment the line with `DATABASE_CREDENTIALS = {adapter: "postgres"...`. in the [config.ru](config.ru#L17). - -Set up postgres database - ```bash psql postgres -c "CREATE DATABASE pact_broker;" -psql postgres -c "CREATE ROLE pact_broker WITH LOGIN PASSWORD 'CHANGE_ME';" +psql postgres -c "CREATE ROLE pact_broker WITH LOGIN PASSWORD 'pact_broker';" psql postgres -c "GRANT ALL PRIVILEGES ON DATABASE pact_broker TO pact_broker;" ``` +Uncomment `gem 'pg'` in the [Gemfile](Gemfile) + +Comment out `gem 'sqlite3'` in the [Gemfile](Gemfile) + +Replace the `database_url` in `config/pact_broker.yml` with `postgres://pact_broker:pact_broker@<YOUR_DB_HOST>/pact_broker` + Install dependencies ```bash bundle install ``` Run Pact Broker ```bash -bundle exec rackup +bundle exec puma ``` -If you need an example data run following command - -```bash -psql pact_broker < example_data.sql -``` - Now Pact Broker can be access locally at [http://localhost:9292](http://localhost:9292). -[docker-pact-broker]: https://github.com/DiUS/pact_broker-docker -[pact-broker-dir]: https://github.com/DiUS/pact_broker-docker/tree/master/pact_broker - +[docker-pact-broker]: https://github.com/pact-foundation/pact-broker-docker +[pact-broker-dir]: https://github.com/pact-foundation/pact-broker-docker/tree/master/pact_broker