From 48ea38061dfa5054bbccd0e0a5303f477ce68d0a Mon Sep 17 00:00:00 2001 From: Bogdan Covrig Date: Thu, 2 Dec 2021 22:47:10 +0100 Subject: [PATCH 1/4] Update Postgres config snippet --- .../deployment/hosting-guides/heroku.md | 28 ++++++++----------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/heroku.md b/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/heroku.md index 12ae138787..096ca525b4 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/heroku.md +++ b/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/heroku.md @@ -207,25 +207,19 @@ const parse = require('pg-connection-string').parse; const config = parse(process.env.DATABASE_URL); module.exports = ({ env }) => ({ - defaultConnection: 'default', - connections: { - default: { - connector: 'bookshelf', - settings: { - client: 'postgres', - host: config.host, - port: config.port, - database: config.database, - username: config.user, - password: config.password, - ssl: { - rejectUnauthorized: false, - }, - }, - options: { - ssl: true, + connection: { + client: 'postgres', + connection: { + host: config.host, + port: config.port, + database: config.database, + user: config.user, + password: config.password, + ssl: { + rejectUnauthorized: false }, }, + debug: true, }, }); ``` From 38e65871a101d43ba89a06ed6ec974b49a05d678 Mon Sep 17 00:00:00 2001 From: Bogdan Covrig Date: Thu, 2 Dec 2021 22:55:07 +0100 Subject: [PATCH 2/4] Update Postgres config snippet debug flag --- .../setup-deployment-guides/deployment/hosting-guides/heroku.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/heroku.md b/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/heroku.md index 096ca525b4..3780810e0e 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/heroku.md +++ b/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/heroku.md @@ -219,7 +219,7 @@ module.exports = ({ env }) => ({ rejectUnauthorized: false }, }, - debug: true, + debug: false, }, }); ``` From fd3126aa43ffb53ed53bdc2d747a0b2ae181b967 Mon Sep 17 00:00:00 2001 From: Bogdan Covrig Date: Thu, 2 Dec 2021 23:02:11 +0100 Subject: [PATCH 3/4] Update localhost URLs to /developer-docs/ URL --- .../deployment/hosting-guides/heroku.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/heroku.md b/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/heroku.md index 3780810e0e..f38e17ec88 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/heroku.md +++ b/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/heroku.md @@ -198,7 +198,7 @@ yarn add pg-connection-string #### 4. Create your Heroku database config file for production -Create new subfolders in `./config` like so: `/env/production`, then create a new `database.js` in it (see [environment documentation](http://localhost:8080/documentation/developer-docs/latest/setup-deployment-guides/configurations/optional/environment.md)). Your path should look like this: `./config/env/production/database.js`. When you run locally you should be using the `./config/database.js` which could be set to use SQLite, however it's recommended you use PostgreSQL locally also, for information on configuring your local database, please see the [database documentation](/developer-docs/latest/setup-deployment-guides/configurations/required/databases.md). +Create new subfolders in `./config` like so: `/env/production`, then create a new `database.js` in it (see [environment documentation](/developer-docs/latest/setup-deployment-guides/configurations/optional/environment.md)). Your path should look like this: `./config/env/production/database.js`. When you run locally you should be using the `./config/database.js` which could be set to use SQLite, however it's recommended you use PostgreSQL locally also, for information on configuring your local database, please see the [database documentation](/developer-docs/latest/setup-deployment-guides/configurations/required/databases.md). `Path: ./config/env/production/database.js` @@ -232,7 +232,7 @@ heroku config:set NODE_ENV=production #### 5. Create your Strapi server config for production -Create a new `server.js` in a new [env](http://localhost:8080/documentation/developer-docs/latest/setup-deployment-guides/configurations/optional/environment.md) folder. In this file you only need one key, the `url`, to notify Strapi what our public Heroku domain is. All other settings will automatically be pulled from the default `./config/server.js`. +Create a new `server.js` in a new [env](/developer-docs/latest/setup-deployment-guides/configurations/optional/environment.md) folder. In this file you only need one key, the `url`, to notify Strapi what our public Heroku domain is. All other settings will automatically be pulled from the default `./config/server.js`. `Path: ./config/env/production/server.js` From 263cb7efdb4cd11e05c726f1eb0618a888dc71f0 Mon Sep 17 00:00:00 2001 From: Bogdan Covrig Date: Thu, 2 Dec 2021 23:03:00 +0100 Subject: [PATCH 4/4] Remove the v4 contribution disclaimer --- .../setup-deployment-guides/deployment/hosting-guides/heroku.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/heroku.md b/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/heroku.md index f38e17ec88..ee0fce55aa 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/heroku.md +++ b/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/heroku.md @@ -6,8 +6,6 @@ canonicalUrl: https://docs.strapi.io/developer-docs/latest/setup-deployment-guid # Heroku -!!!include(developer-docs/latest/setup-deployment-guides/deployment/snippets/deployment-guide-not-updated.md)!!! - This is a step-by-step guide for deploying a Strapi project on [Heroku](https://www.heroku.com/). Databases that work well with Strapi and Heroku are provided instructions on how to get started. ### Heroku Install Requirements