You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/heroku.md
+8-11Lines changed: 8 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,15 +16,15 @@ The purpose of this guide is to allow users to deploy Strapi applications on Her
16
16
17
17
:::
18
18
19
-
Prior to starting the deployment process each user needs:
19
+
Prior to starting the deployment process, each user needs:
20
20
21
21
- a [Heroku account](https://signup.heroku.com/),
22
22
-[Git version control](https://docs.github.com/en/get-started/quickstart/set-up-git),
23
23
- an existing Strapi application.
24
24
25
25
## Setup a Strapi project for deployment
26
26
27
-
Strapi uses [environment configurations](/developer-docs/latest/setup-deployment-guides/configurations/optional/environment.md) to maintain multiple environments inside a single application. This section describes how to setup a production environment in a Strapi application.
27
+
Strapi uses [environment configurations](/developer-docs/latest/setup-deployment-guides/configurations/optional/environment.md) to maintain multiple environments inside a single application. This section describes how to set up a production environment in a Strapi application.
28
28
29
29
1. Add a production configuration environment by creating a sub-directory `./config/env/production`.
30
30
2. Create `database.js` inside the `./config/env/production` directory.
Deploying to Heroku requires installing the CLI tool, creating an App, connecting the App to a database, and setting environment variables. At the end of the following steps a Strapi application should be successfully deployed.
168
+
Deploying to Heroku requires installing the CLI tool, creating an App, connecting the App to a database, and setting environment variables. At the end of the following steps, a Strapi application should be successfully deployed.
169
169
170
170
### Install and use the Heroku CLI
171
171
@@ -204,7 +204,6 @@ Deploying to Heroku requires installing the CLI tool, creating an App, connectin
204
204
205
205
2. Login to Heroku from the CLI, following the command-line instructions:
206
206
207
-
208
207
```bash
209
208
heroku login
210
209
```
@@ -230,7 +229,7 @@ To initialize a local project folder with an existing Heroku project use the fol
230
229
heroku git:remote -a your-heroku-app-name
231
230
```
232
231
233
-
The local development environment is now set-up and configured to work with Heroku.
232
+
The local development environment is now setup and configured to work with Heroku.
234
233
235
234
### Create a Heroku database
236
235
@@ -265,7 +264,7 @@ The following tabs detail how to either set new values for the secrets or transf
265
264
266
265
:::: tabs card
267
266
268
-
::: tab Set new secrets Mac adn Linux
267
+
::: tab Set new secrets Mac and Linux
269
268
270
269
The following `openssl` commands will generate random new secrets (Mac and Linux only) and set the config values:
On Windows, secrets can be generated manually by running `node -p "require('crypto').randomBytes(48).toString('base64');"` and subsequently set on Heroku using the command`heroku config:set SECRET_NAME=your-key-here`for each variable.
300
299
:::
301
300
302
-
303
-
304
301
### Deploy an application to Heroku
305
302
306
303
In the project root directory run the `git push heroku HEAD:main` CLI command to push the project to the Heroku server:
@@ -310,18 +307,18 @@ In the project root directory run the `git push heroku HEAD:main` CLI command to
310
307
git push heroku HEAD:main
311
308
```
312
309
313
-
The deployment may take a few minutes. At the end, logs will display the url of the project (e.g. `https://mighty-taiga-80884.herokuapp.com`). The project can also be opened from the command line:
310
+
The deployment may take a few minutes. At the end, logs will display the URL of the project (e.g. `https://mighty-taiga-80884.herokuapp.com`). The project can also be opened from the command line:
314
311
315
312
```bash
316
313
# path: ./my-project/`
317
314
heroku open
318
315
```
319
316
320
-
The Strapi Welcome page indicates that the project is correctly set-up, configured and deployed on Heroku. Next, set up an `admin user` as the production database is brand-new and empty. Add `/admin` to the end of the website address to access the signup page.
317
+
The Strapi Welcome page indicates that the project is correctly setup, configured, and deployed on Heroku. Next, set up an `admin user` as the production database is brand-new and empty. Add `/admin` to the end of the website address to access the signup page.
321
318
322
319
## Project updates
323
320
324
-
Modifications that require writing to model creation or other json files, such as creating or changing content-types, require making those changes on the local development environment and then pushing the changes to Heroku. See the documentation [FAQ forPaaS](/developer-docs/getting-started/troublshooting.md#why-are-my-application-s-database-and-uploads-resetting-on-paas) and the [FAQ for content-typesin production](/developer-docs/getting-started/troublshooting.md#why-can-t-i-create-or-update-content-types-in-production-staging) for more information.
321
+
Modifications that require writing to model creation or other JSON files, such as creating or changing contenttypes, require making those changes on the local development environment and then pushing the changes to Heroku. See the documentation [FAQ forPaaS](/developer-docs/getting-started/troublshooting.md#why-are-my-application-s-database-and-uploads-resetting-on-paas) and the [FAQ for content-typesin production](/developer-docs/getting-started/troublshooting.md#why-can-t-i-create-or-update-content-types-in-production-staging) for more information.
325
322
326
323
Further development can benefit from [version control](https://devcenter.heroku.com/articles/github-integration), or continue using `git push heroku HEAD:main` to commit and push changes to Heroku directly.
0 commit comments