Skip to content

Commit b9dbe09

Browse files
bogdaaamnpwizla
andauthored
docs: update the Heroku Deployment Guide for v4 (#549)
* Update Postgres config snippet * Update Postgres config snippet debug flag * Update localhost URLs to /developer-docs/ URL * Remove the v4 contribution disclaimer Co-authored-by: Pierre Wizla <[email protected]>
1 parent 5454f33 commit b9dbe09

File tree

1 file changed

+13
-21
lines changed
  • docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides

1 file changed

+13
-21
lines changed

docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/heroku.md

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ canonicalUrl: https://docs.strapi.io/developer-docs/latest/setup-deployment-guid
66

77
# Heroku
88

9-
!!!include(developer-docs/latest/setup-deployment-guides/deployment/snippets/deployment-guide-not-updated.md)!!!
10-
119
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.
1210

1311
### Heroku Install Requirements
@@ -198,7 +196,7 @@ yarn add pg-connection-string
198196

199197
#### 4. Create your Heroku database config file for production
200198

201-
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).
199+
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).
202200

203201
`Path: ./config/env/production/database.js`
204202

@@ -207,25 +205,19 @@ const parse = require('pg-connection-string').parse;
207205
const config = parse(process.env.DATABASE_URL);
208206

209207
module.exports = ({ env }) => ({
210-
defaultConnection: 'default',
211-
connections: {
212-
default: {
213-
connector: 'bookshelf',
214-
settings: {
215-
client: 'postgres',
216-
host: config.host,
217-
port: config.port,
218-
database: config.database,
219-
username: config.user,
220-
password: config.password,
221-
ssl: {
222-
rejectUnauthorized: false,
223-
},
224-
},
225-
options: {
226-
ssl: true,
208+
connection: {
209+
client: 'postgres',
210+
connection: {
211+
host: config.host,
212+
port: config.port,
213+
database: config.database,
214+
user: config.user,
215+
password: config.password,
216+
ssl: {
217+
rejectUnauthorized: false
227218
},
228219
},
220+
debug: false,
229221
},
230222
});
231223
```
@@ -238,7 +230,7 @@ heroku config:set NODE_ENV=production
238230

239231
#### 5. Create your Strapi server config for production
240232

241-
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`.
233+
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`.
242234

243235
`Path: ./config/env/production/server.js`
244236

0 commit comments

Comments
 (0)