docs: publish restructure (#3496)
* docs: added features and guides overview page * added image * added version 2 * added version 3 * added version 4 * docs: implemented new color scheme * docs: redesigned sidebar (#3193) * docs: redesigned navbar for restructure (#3199) * docs: redesigned footer (#3209) * docs: redesigned cards (#3230) * docs: redesigned admonitions (#3231) * docs: redesign announcement bar (#3236) * docs: redesigned large cards (#3239) * docs: redesigned code blocks (#3253) * docs: redesigned search modal and page (#3264) * docs: redesigned doc footer (#3268) * docs: added new sidebars + refactored css and assets (#3279) * docs: redesigned api reference sidebar * docs: refactored css * docs: added code tabs transition * docs: added new sidebars * removed unused assets * remove unusued assets * Fix deploy errors * fix incorrect link * docs: fixed code responsivity + missing icons (#3283) * docs: changed icons (#3296) * docs: design fixes to the sidebar (#3297) * redesign fixes * docs: small design fixes * docs: several design fixes after restructure (#3299) * docs: bordered icon fixes * docs: desgin fixes * fixes to code blocks and sidebar scroll * design adjustments * docs: restructured homepage (#3305) * docs: restructured homepage * design fixes * fixed core concepts icon * docs: added core concepts page (#3318) * docs: restructured homepage * design fixes * docs: added core concepts page * changed text of different components * docs: added architecture link * added missing prop for user guide * docs: added regions overview page (#3327) * docs: added regions overview * moved region pages to new structure * docs: fixed description of regions architecture page * small changes * small fix * docs: added customers overview page (#3331) * docs: added regions overview * moved region pages to new structure * docs: fixed description of regions architecture page * small changes * small fix * docs: added customers overview page * fix link * resolve link issues * docs: updated regions architecture image * docs: second-iteration fixes (#3347) * docs: redesigned document * design fixes * docs: added products overview page (#3354) * docs: added carts overview page (#3363) * docs: added orders overview (#3364) * docs: added orders overview * added links in overview * docs: added vercel redirects * docs: added soon badge for cards (#3389) * docs: resolved feedback changes + organized troubleshooting pages (#3409) * docs: resolved feedback changes * added extra line * docs: changed icons for restructure (#3421) * docs: added taxes overview page (#3422) * docs: added taxes overview page * docs: fix sidebar label * added link to taxes overview page * fixed link * docs: fixed sidebar scroll (#3429) * docs: added discounts overview (#3432) * docs: added discounts overview * fixed links * docs: added gift cards overview (#3433) * docs: added price lists overview page (#3440) * docs: added price lists overview page * fixed links * docs: added sales channels overview page (#3441) * docs: added sales overview page * fixed links * docs: added users overview (#3443) * docs: fixed sidebar border height (#3444) * docs: fixed sidebar border height * fixed svg markup * docs: added possible solutions to feedback component (#3449) * docs: added several overview pages + restructured files (#3463) * docs: added several overview pages * fixed links * docs: added feature flags + PAK overview pages (#3464) * docs: added feature flags + PAK overview pages * fixed links * fix link * fix link * fixed links colors * docs: added strategies overview page (#3468) * docs: automated upgrade guide (#3470) * docs: automated upgrade guide * fixed vercel redirect * docs: restructured files in docs codebase (#3475) * docs: restructured files * docs: fixed eslint exception * docs: finished restructure loose-ends (#3493) * fixed uses of backend * docs: finished loose ends * eslint fixes * fixed links * merged master * added update instructions for v1.7.12
This commit is contained in:
@@ -7,14 +7,14 @@ import styles from '../deployment.module.css';
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
# Deploy Your Medusa Server on Heroku
|
||||
# Deploy Your Medusa Backend on Heroku
|
||||
|
||||
In this document, you'll learn how to deploy your Medusa server on Heroku. Heroku is a PaaS (Platform as a Service) that allows you to easily deploy your applications in the cloud.
|
||||
In this document, you'll learn how to deploy your Medusa backend on Heroku. Heroku is a PaaS (Platform as a Service) that allows you to easily deploy your applications in the cloud.
|
||||
|
||||
Alternatively, you can use this button to deploy the Medusa server to Heroku directly:
|
||||
Alternatively, you can use this button to deploy the Medusa backend to Heroku directly:
|
||||
|
||||
<a href="https://heroku.com/deploy?template=https://github.com/medusajs/medusa-starter-default/tree/feat/deploy-heroku" class="img-url">
|
||||
<img src="https://www.herokucdn.com/deploy/button.svg" alt="Deploy to Heroku" class="no-zoom-img" />
|
||||
<a href="https://heroku.com/deploy?template=https://github.com/medusajs/medusa-starter-default/tree/feat/deploy-heroku" className="img-url">
|
||||
<img src="https://www.herokucdn.com/deploy/button.svg" alt="Deploy to Heroku" className="no-zoom-img" />
|
||||
</a>
|
||||
|
||||
<div>
|
||||
@@ -25,11 +25,11 @@ Alternatively, you can use this button to deploy the Medusa server to Heroku dir
|
||||
|
||||
## Prerequisites
|
||||
|
||||
### Medusa Server
|
||||
### Medusa Backend
|
||||
|
||||
It is assumed that you already have a Medusa server installed locally. If you don’t, please follow the [quickstart guide](../../quickstart/quick-start.mdx).
|
||||
It is assumed that you already have a Medusa backend installed locally. If you don’t, please follow the [quickstart guide](../../development/backend/install.mdx).
|
||||
|
||||
Furthermore, your Medusa server should be configured to work with PostgreSQL and Redis. You can follow the [Configure your Server documentation](../../usage/configurations.md) to learn how to do that.
|
||||
Furthermore, your Medusa backend should be configured to work with PostgreSQL and Redis. You can follow the [Configure your Backend documentation](../../development/backend/configurations.md) to learn how to do that.
|
||||
|
||||
### Needed Accounts
|
||||
|
||||
@@ -37,7 +37,7 @@ Furthermore, your Medusa server should be configured to work with PostgreSQL and
|
||||
|
||||
### Required Tools
|
||||
|
||||
- Git’s CLI tool. You can follow [this documentation to learn how to install it for your operating system](../../tutorial/0-set-up-your-development-environment.mdx#git).
|
||||
- Git’s CLI tool. You can follow [this documentation to learn how to install it for your operating system](../../development/backend/prepare-environment.mdx#git).
|
||||
- Heroku's CLI tool. You can follow [Heroku's documentation to learn how to install it for your operating system](https://devcenter.heroku.com/articles/heroku-cli).
|
||||
|
||||
---
|
||||
@@ -56,7 +56,7 @@ Depending on your operating system, you must follow either the instructions in y
|
||||
|
||||
### 2. Create an App with Heroku
|
||||
|
||||
In the root directory of your Medusa server, run the following commands to create an app on Heroku and add it as a remote origin:
|
||||
In the root directory of your Medusa backend, run the following commands to create an app on Heroku and add it as a remote origin:
|
||||
|
||||
```bash
|
||||
heroku create <APP_NAME>
|
||||
@@ -97,9 +97,9 @@ This uses the lowest plan in Stackhero Redis. You can check out [the plans and p
|
||||
|
||||
### 4. Configure Environment Variables on Heroku
|
||||
|
||||
Medusa requires a set of environment variables to be configured. You can learn more about Medusa's configurations in the [Configure your Medusa Server](../../usage/configurations.md) document.
|
||||
Medusa requires a set of environment variables to be configured. You can learn more about Medusa's configurations in the [Configure your Medusa backend](../../development/backend/configurations.md) document.
|
||||
|
||||
Run the following commands in the root directory of your Medusa server to set some environment variables:
|
||||
Run the following commands in the root directory of your Medusa backend to set some environment variables:
|
||||
|
||||
```bash
|
||||
heroku config:set NODE_ENV=production
|
||||
@@ -150,7 +150,7 @@ However, if you use another add-on, make sure to set the environment variable `D
|
||||
|
||||
#### (Optional) Configure CORS Variables
|
||||
|
||||
Optionally, if you've deployed the admin dashboard and you want to ensure it can use the server's REST APIs, you must set the following environment variable:
|
||||
Optionally, if you've deployed the admin dashboard and you want to ensure it can use the backend's REST APIs, you must set the following environment variable:
|
||||
|
||||
```bash
|
||||
heroku config:set ADMIN_CORS=<YOUR_ADMIN_URL>
|
||||
@@ -158,7 +158,7 @@ heroku config:set ADMIN_CORS=<YOUR_ADMIN_URL>
|
||||
|
||||
Where `<YOUR_ADMIN_URL>` is the URL of your admin dashboard.
|
||||
|
||||
Similarly, if you've deployed the storefront and you want to ensure it can use the server's REST APIs, you must set the following environment variable:
|
||||
Similarly, if you've deployed the storefront and you want to ensure it can use the backend's REST APIs, you must set the following environment variable:
|
||||
|
||||
```bash
|
||||
heroku config:set STORE_CORS=<YOUR_STOREFRONT_URL>
|
||||
@@ -166,9 +166,9 @@ heroku config:set STORE_CORS=<YOUR_STOREFRONT_URL>
|
||||
|
||||
Where `<YOUR_STOREFRONT_URL>` is the URL of your storefront.
|
||||
|
||||
### 5. Configure Medusa Server
|
||||
### 5. Configure Medusa Backend
|
||||
|
||||
Before jumping into the deployment, you need to configure your Medusa server to ensure it uses the previous environment variables and the recommended production configurations.
|
||||
Before jumping into the deployment, you need to configure your Medusa backend to ensure it uses the previous environment variables and the recommended production configurations.
|
||||
|
||||
#### medusa-config.js
|
||||
|
||||
@@ -205,21 +205,21 @@ Update `scripts` to include the following scripts:
|
||||
},
|
||||
```
|
||||
|
||||
### 6. Launch your Medusa Server
|
||||
### 6. Launch your Medusa Backend
|
||||
|
||||
Finally, commit and push all changes to Heroku:
|
||||
|
||||
```bash
|
||||
git add .
|
||||
git commit -m "Deploy Medusa Server on Heroku"
|
||||
git commit -m "Deploy Medusa Backend on Heroku"
|
||||
git push heroku HEAD:master
|
||||
```
|
||||
|
||||
This triggers a redeploy of the Medusa server with all the new configurations.
|
||||
This triggers a redeploy of the Medusa backend with all the new configurations.
|
||||
|
||||
## Test your Server
|
||||
## Test your Backend
|
||||
|
||||
To test your server, run the following command to retrieve the server's URL:
|
||||
To test your backend, run the following command to retrieve the backend's URL:
|
||||
|
||||
```bash
|
||||
heroku apps:info -a <APP_NAME>
|
||||
@@ -227,13 +227,13 @@ heroku apps:info -a <APP_NAME>
|
||||
|
||||
Where `<APP_NAME>` is the name of the app. You should see as the output a bunch of info of the app.
|
||||
|
||||
The server's URL is available under "Web URL". You can copy it and perform requests to it to test it out.
|
||||
The backend's URL is available under "Web URL". You can copy it and perform requests to it to test it out.
|
||||
|
||||
For example, you can send a request to `<YOUR_SERVER_URL>/store/products` and you should receive a JSON response with the products in your store.
|
||||
For example, you can send a request to `<YOUR_BACKEND_URL>/store/products` and you should receive a JSON response with the products in your store.
|
||||
|
||||
### Troubleshooting: Inspect Build Logs
|
||||
|
||||
If an error occurs during the deployment, you can explore your Heroku app build logs using the following command in the root directory of your Medusa server:
|
||||
If an error occurs during the deployment, you can explore your Heroku app build logs using the following command in the root directory of your Medusa backend:
|
||||
|
||||
```bash
|
||||
heroku logs -n 500000 --remote heroku --tail -a <APP_NAME>
|
||||
@@ -243,9 +243,9 @@ Where `<APP_NAME>` is the name of the app.
|
||||
|
||||
---
|
||||
|
||||
## Run Commands on Your Server
|
||||
## Run Commands on Your Backend
|
||||
|
||||
To run commands on your server, you can use the following command:
|
||||
To run commands on your backend, you can use the following command:
|
||||
|
||||
```bash
|
||||
heroku run -a <APP_NAME> -- <COMMAND>
|
||||
|
||||
Reference in New Issue
Block a user