docs: changes to deployment + remove admin deployment guides (#10345)

* docs: change headings and text in deployment

* remove admin deployment guide

* generate changes
This commit is contained in:
Shahed Nasser authored and GitHub committed 2024-11-28 14:48:10 +02:00
1 parent aca7907d81
commit 768f970926
9 files changed
+35 -279

No files matched your search

@@ -39,7 +39,7 @@ When you deploy your Medusa application, make sure your chosen hosting provider
1. PostgreSQL database: If your hosting provider doesn't support database hosting, you must find another hosting provider for the PostgreSQL database.
2. Redis database: If your hosting provider doesn't support database hosting, you must find another hosting provider for the Redis database.
3. Medusa application in server and worker mode. This means your hosting provider should support deploying two applications or instances from the same codebase.
5. If you're also hosting the Medusa Admin with the server, the hosting provider and plan should offer at least 2GB of RAM.
4. For optimal experience, the hosting provider and plan must offer at least 2GB of RAM.
---
@@ -68,18 +68,7 @@ Later, you’ll set different values of the `MEDUSA_WORKER_MODE` environment var
### Configure Medusa Admin
There are two cases where you may disable the Medusa Admin in your deployed Medusa application:
1. If you choose to host it separately.
2. In the Medusa application running in worker mode, as it doesn’t need to run the admin.
<Note>
To host the admin with the Medusa application, the hosting provider and plan should offer at least 2GB of RAM.
</Note>
So, add the following configuration in `medusa-config.ts`:
You need to disable the Medusa Admin in the worker Medusa application, while keeping it enabled in the server Medusa application. So, add the following configuration in `medusa-config.ts`:
```ts title="medusa-config.ts"
module.exports = defineConfig({
@@ -208,7 +197,6 @@ JWT_SECRET=supersecret # TODO GENERATE SECURE SECRET
STORE_CORS= # STOREFRONT URL
ADMIN_CORS= # ADMIN URL
AUTH_CORS= # STOREFRONT AND ADMIN URLS, SEPARATED BY COMMAS
# change to false if you're hosting the admin with the application
DISABLE_MEDUSA_ADMIN=true
MEDUSA_WORKER_MODE=server
PORT=9000
@@ -220,9 +208,9 @@ Where:
- The value of `COOKIE_SECRET` and `JWT_SECRET` must be a randomly generated secret.
- `STORE_CORS`'s value is the URL of your storefront. If you don’t have it yet, you can skip adding it for now.
- `ADMIN_CORS`'s value is the URL of the admin dashboard. If you don’t have it yet, or you’re deploying the admin with the Medusa application, you can skip adding it for now.
- `ADMIN_CORS`'s value is the URL of the admin dashboard, which is the same as the server Medusa application. You can add it later if you don't currently have it.
- `AUTH_CORS`'s value is the URLs of any application authenticating users, customers, or other actor types, such as the storefront and admin URLs. The URLs are separated by commas. If you don’t have the URLs yet, you can set its value later.
- Change `DISABLE_MEDUSA_ADMIN` to `false` if you’re hosting the admin with the Medusa application.
- Set `DISABLE_MEDUSA_ADMIN`'s value to `false` so that the admin is built with the server application.
- Set the PostgreSQL database's connection URL as the value of `DATABASE_URL`
- Set the Redis database's connection URL as the value of `REDIS_URL`.
@@ -240,11 +228,9 @@ If your hosting provider doesn't support setting a current-working directory, se
cd .medusa/server && npm run predeploy && npm run start
```
### Additional Configuration if Deploying with Admin
### Set Backend URL in Admin Configuration
If you’re deploying the Medusa application in server mode with the admin, you have to make some changes after you’ve obtained the application’s URL.
First, add the following configuration to `medusa-config.ts`:
After you’ve obtained the Medusa application’s URL, add the following configuration to `medusa-config.ts`:
```ts title="medusa-config.ts"
module.exports = defineConfig({
@@ -299,7 +285,7 @@ REDIS_URL= # REDIS DATABASE URL
Where:
- The value of `COOKIE_SECRET` and `JWT_SECRET` must be a randomly generated secret.
- Keep `DISABLE_MEDUSA_ADMIN`'s value set to `true`, even if you’re hosting the admin with the Medusa application.
- Set `DISABLE_MEDUSA_ADMIN`'s value to `true` so that the admin isn't built with the worker application.
- Set the PostgreSQL database's connection URL as the value of `DATABASE_URL`
- Set the Redis database's connection URL as the value of `REDIS_URL`.
@@ -323,9 +309,7 @@ cd .medusa/server && npm run predeploy && npm run start
Once the application is deployed and live, go to `<APP_URL>/health`, where `<APP_URL>` is the URL of the Medusa application in server mode. If the deployment was successful, you’ll see the `OK` response.
### Open Deployed Medusa Admin
If you deployed the Medusa Admin with the application, it’ll be available at `<APP_URL>/app`.
The Medusa Admin is also available at `<APP_URL>/app`.
---