From d4d101c7f97d8f9fca7e8ea4700e84b30d173e42 Mon Sep 17 00:00:00 2001 From: Stepan Kuzmin Date: Sun, 17 Oct 2021 17:30:35 +0300 Subject: [PATCH] docs: add using with Heroku Postgres recipe --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 786c3730..82358376 100755 --- a/README.md +++ b/README.md @@ -735,3 +735,25 @@ DATABASE_URL=postgres://postgres@localhost/db cargo bench ``` An HTML report displaying the results of the benchmark will be generated under `target/criterion/report/index.html` + +## Recipes + +### Using with Heroku Postgres + +You can use Martin with [Managed PostgreSQL from Heroku](https://www.heroku.com/postgres) with PostGIS extension + +``` +heroku pg:psql -a APP_NAME -c 'create extension postgis' +``` + +In order to trust the Heroku certificate, you can disable certificate validation with either `DANGER_ACCEPT_INVALID_CERTS` environment variable + +``` +DATABASE_URL=$(heroku config:get DATABASE_URL -a APP_NAME) DANGER_ACCEPT_INVALID_CERTS=true martin +``` + +or `--danger-accept-invalid-certs` command-line argument + +``` +martin --danger-accept-invalid-certs $(heroku config:get DATABASE_URL -a APP_NAME) +```