From 91f6cfad5d391ae7364b1b576778b69ae31d8f0c Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Wed, 25 Jun 2025 12:20:02 +0300 Subject: [PATCH] docs: wording and structural changes to cloud (#12820) * docs: wording and structural changes to cloud * Fix vale error * Fix faq title * Fix heading levels * Small change to previews --- www/apps/cloud/app/billing-usage/page.mdx | 4 +- .../cloud/app/connect-storefront/page.mdx | 4 +- www/apps/cloud/app/database/page.mdx | 22 +- www/apps/cloud/app/deployments/page.mdx | 26 +- .../cloud/app/draft-order-plugin/page.mdx | 2 +- .../environment-variables/page.mdx | 125 ++++++ .../app/environments/long-lived/page.mdx | 232 ++++++++++ www/apps/cloud/app/environments/page.mdx | 405 +----------------- .../cloud/app/environments/preview/page.mdx | 119 +++++ www/apps/cloud/app/faq/page.mdx | 53 +++ www/apps/cloud/app/infrastructure/page.mdx | 36 -- www/apps/cloud/app/loyalty-plugin/page.mdx | 2 +- www/apps/cloud/app/notifications/page.mdx | 4 +- www/apps/cloud/app/organizations/page.mdx | 2 +- www/apps/cloud/app/page.mdx | 70 +-- www/apps/cloud/app/projects/page.mdx | 14 +- www/apps/cloud/app/redis/page.mdx | 14 +- www/apps/cloud/app/s3/page.mdx | 14 +- www/apps/cloud/app/support/page.mdx | 59 --- www/apps/cloud/app/update-medusa/page.mdx | 10 +- www/apps/cloud/generated/edit-dates.mjs | 34 +- www/apps/cloud/generated/sidebar.mjs | 68 ++- www/apps/cloud/next.config.mjs | 12 + www/apps/cloud/sidebar.mjs | 45 +- 24 files changed, 713 insertions(+), 663 deletions(-) create mode 100644 www/apps/cloud/app/environments/environment-variables/page.mdx create mode 100644 www/apps/cloud/app/environments/long-lived/page.mdx create mode 100644 www/apps/cloud/app/environments/preview/page.mdx create mode 100644 www/apps/cloud/app/faq/page.mdx delete mode 100644 www/apps/cloud/app/infrastructure/page.mdx delete mode 100644 www/apps/cloud/app/support/page.mdx diff --git a/www/apps/cloud/app/billing-usage/page.mdx b/www/apps/cloud/app/billing-usage/page.mdx index 6a9eac0fab..3288becd33 100644 --- a/www/apps/cloud/app/billing-usage/page.mdx +++ b/www/apps/cloud/app/billing-usage/page.mdx @@ -114,7 +114,7 @@ You'll find two sections at the top of the Billing settings: You set your organization's plan when you sign up for Cloud. However, the plan may not be the best fit for your needs as your business grows. -If you want to change your plan or learn more about your plan's resources and limits, [contact support](../support/page.mdx) for assistance. +If you want to change your plan or learn more about your plan's resources and limits, contact support for assistance. --- @@ -149,4 +149,4 @@ If a payment for your organization's subscription fails, you'll receive a [notif The payment may fail for various reasons, such as insufficient funds, an expired card, or other issues with the payment method. Make sure to [update your payment method](#manage-payment-method) if needed. -If there are no issues with your payment method and the payment still fails, [contact support](../support/page.mdx) for assistance. \ No newline at end of file +If there are no issues with your payment method and the payment still fails, contact support for assistance. \ No newline at end of file diff --git a/www/apps/cloud/app/connect-storefront/page.mdx b/www/apps/cloud/app/connect-storefront/page.mdx index d582467289..2537cac92e 100644 --- a/www/apps/cloud/app/connect-storefront/page.mdx +++ b/www/apps/cloud/app/connect-storefront/page.mdx @@ -25,7 +25,7 @@ To allow your production storefront to access your Medusa application on Cloud, - `STORE_CORS`: The URLs of storefronts that can access your Medusa server's `/store` API routes. This is a comma-separated list of URLs that is typically used as the value of the [http.storeCors](!docs!/learn/configurations/medusa-config#httpstorecors) configuration. - `AUTH_CORS`: The URLs of the clients (storefront and admin) that can access the Medusa server's `/auth` API routes. This is a comma-separated list of URLs that is typically used as the value of the [http.authCors](!docs!/learn/configurations/medusa-config#httpauthcors) configuration. -For example, if your storefront is hosted at `https://my-storefront.com`, you can [set the following environment variables in your production environment](../environments/page.mdx#add-environment-variables): +For example, if your storefront is hosted at `https://my-storefront.com`, you can [set the following environment variables in your production environment](../environments/environment-variables/page.mdx#add-environment-variables): ```shell STORE_CORS=https://my-storefront.com @@ -39,7 +39,7 @@ STORE_CORS=https://my-storefront.com,https://another-storefront.com AUTH_CORS=https://my-storefront.com,https://another-storefront.com ``` -After adding these environment variables, [redeploy the environment](../environments/page.mdx#redeploy-environment) to apply the changes. +After adding these environment variables, [redeploy the environment](../environments/long-lived/page.mdx#redeploy-environment) to apply the changes. --- diff --git a/www/apps/cloud/app/database/page.mdx b/www/apps/cloud/app/database/page.mdx index 6a513e2eb6..58b5f1b301 100644 --- a/www/apps/cloud/app/database/page.mdx +++ b/www/apps/cloud/app/database/page.mdx @@ -4,15 +4,15 @@ export const metadata = { # {metadata.title} -In this guide, you'll learn about the managed database service that Cloud provides as part of your project environments. +In this guide, you'll learn about the managed database service that Medusa provides as part of your project environments. ## Managed Database Service -Cloud offers a managed PostgreSQL database service for your project environments. Each environment has its own dedicated database that is automatically provisioned when the environment is created. +Medusa provisions and manages databases for each of your environments. -So, when you create a new project, Cloud creates a production database for the production environment. If you create a staging environment, Cloud creates a separate database for that environment as well. +Each project environment has a dedicated PostgreSQL database. These databases are entirely isolated from one another. -This isolation between environment databases allows you to safely make or test changes in environments without affecting one another, especially the production environment and its data. +This isolation allows you to safely make or test changes in environments without affecting one another, especially the production environment and its data. ![Diagram showcasing isolation between environment databases](https://res.cloudinary.com/dza7lstvk/image/upload/v1750174759/Cloud/databases-cloud_hzjyrn.jpg) @@ -20,27 +20,27 @@ This isolation between environment databases allows you to safely make or test c ## Database Configurations -Cloud automatically configures the database for your environments. So, you don't need to worry about setting up the database, configuring it with your Medusa application, or monitoring performance and availability on your end. +Medusa automatically configures the database for your environments. So, you don't need to worry about setting up the database, configuring it with your Medusa application, or monitoring performance and availability on your end. --- ## Database Backups -Cloud provides automatic backups for your environment databases. These backups are retained for 14 days and allow you to restore your database to a previous state, if needed. +Medusa provides automatic backups for your environment databases. These backups are retained for 14 days and allow you to restore your database to a previous state, if needed. -If you need to restore a database backup, you can [contact support](../support/page.mdx) to request a point-in-time recovery. This is useful if you accidentally delete data or need to revert changes made to the database. +If you need to restore a database backup, you can contact support to request a point-in-time recovery. This is useful if you accidentally delete data or need to revert changes made to the database. --- ## Accessing the Database -In some cases, you may need to access the database directly, such as to export or import data. However, since Cloud is a managed service, you can't directly access your database. Cloud also doesn't expose the database connection details. +In some cases, you may need to access the database directly, such as to export or import data. However, since Cloud is a managed service, you can't directly access your database. Medusa also doesn't expose the database connection details. This section provides alternative ways to interact with your database based on your needs. ### Option 1: Database Dump -Cloud allows you to export and import database dumps for any environment. This is useful for seeding the database with initial data, migrating from other hosting platforms, or debugging issues locally. +Medusa allows you to export and import database dumps for any environment. This is useful for seeding the database with initial data, migrating from other hosting platforms, or debugging issues locally. To import or export a database dump for an environment: @@ -105,8 +105,8 @@ This approach allows you to perform any database operations you need, such as re ## Change Preview Environment Database -By default, when Cloud creates a [preview environment](../environments/page.mdx#preview-environments), it replicates the Production database. This allows you to test changes in a safe environment that mirrors production, without affecting the live data. +By default, when Medusa creates a [preview environment](../environments/preview/page.mdx), it replicates the Production database. This allows you to test changes in a safe environment that mirrors production, without affecting the live data. Cloud also allows you to configure which environment's database to replicate the preview database from. For example, you can replicate the Staging environment's database instead of Production. -Learn more in the [Environments](../environments/page.mdx#manage-shared-previews-settings) guide. \ No newline at end of file +Learn more in the [Preview Environments](../environments/preview/page.mdx#manage-shared-previews-settings) guide. \ No newline at end of file diff --git a/www/apps/cloud/app/deployments/page.mdx b/www/apps/cloud/app/deployments/page.mdx index 6298e7fbfd..d04e4cf421 100644 --- a/www/apps/cloud/app/deployments/page.mdx +++ b/www/apps/cloud/app/deployments/page.mdx @@ -19,9 +19,9 @@ The latest deployment of an environment is the live version of that environment, ### How are Deployments Created? -For long-lived environments, Cloud creates a new deployment every time you push a new commit to the environment's branch. For example, if your Production environment is connected to the `main` branch, Cloud will create a new Production deployment every time you push a new commit to the `main` branch. +For long-lived environments, Medusa creates a new deployment every time you push a new commit to the environment's branch. For example, if your Production environment is connected to the `main` branch, Medusa will create a new Production deployment every time you push a new commit to the `main` branch. -For short-lived preview environments, Cloud creates a new environment and deployment when you open a pull request. Cloud will redeploy the preview environment every time you push a new commit to the pull request branch. +For short-lived preview environments, Medusa creates a new environment and deployment when you open a pull request. Medusa will redeploy the preview environment every time you push a new commit to the pull request branch. --- @@ -110,11 +110,11 @@ You can only access a deployment once its status is "Live". You can access it th -For preview environments, refer to the [Environments](../environments/page.mdx#access-deployed-preview-environment) guide to find the URL of the preview environment. +For preview environments, refer to the [Preview Environments](../environments/preview/page.mdx#access-deployed-preview-environment) guide to find the URL of the preview environment. -An environment's URL is in the format `.medusajs.app`, where `` is the subdomain you set either when [creating its project](../projects/page.mdx#create-a-project) or when [creating the environment](../environments/page.mdx#create-a-long-lived-environment). +An environment's URL is in the format `.medusajs.app`, where `` is the subdomain you set either when [creating its project](../projects/page.mdx#create-a-project) or when [creating the environment](../environments/long-lived/page.mdx#create-a-long-lived-environment). You can also find the URL of a deployment's environment through the Cloud dashboard: @@ -123,7 +123,7 @@ You can also find the URL of a deployment's environment through the Cloud dashbo -Aside from the subdomain you set when [creating the environment](../environments/page.mdx#create-a-long-lived-environment), Cloud also provides a unique, randomly generated URL for each environment. Both of these URLs point to the same deployment. +Aside from the subdomain you set when [creating the environment](../environments/long-lived/page.mdx#create-a-long-lived-environment), Medusa also provides a unique, randomly generated URL for each environment. Both of these URLs point to the same deployment. @@ -137,7 +137,7 @@ Aside from the subdomain you set when [creating the environment](../environments To access the Medusa Admin of a live deployment, click on [the environment's URL](#find-environments-url). -You can then log in using the email and password set either [during project creation](../projects/page.mdx#create-a-project) or [in the environment's variables](../environments/page.mdx#create-medusa-admin-user-in-environment). +You can then log in using the email and password set either [during project creation](../projects/page.mdx#create-a-project) or [in the environment's variables](../environments/long-lived/page.mdx#create-medusa-admin-user-in-environment). ### Send Requests to the Deployment @@ -149,13 +149,13 @@ For example, to check the health of the live deployment, you can send a `GET` re curl https://my-project.medusajs.app/health ``` -Where `my-project` is the subdomain you set either when [creating the project](../projects/page.mdx#create-a-project) or when [creating the environment](../environments/page.mdx#create-a-long-lived-environment). +Where `my-project` is the subdomain you set either when [creating the project](../projects/page.mdx#create-a-project) or when [creating the environment](../environments/long-lived/page.mdx#create-a-long-lived-environment). ### Access Deployment's Server through SSH -Cloud doesn't support SSH access to the server instance of a deployment. However, you can still access the server's [runtime and build logs](../logs/page.mdx) to debug issues in your application. +Medusa doesn't support SSH access to the server instance of a deployment. However, you can still access the server's [runtime and build logs](../logs/page.mdx) to debug issues in your application. -If this isn't sufficient for your use case, you can [contact support](../support/page.mdx) to discuss alternatives. +If this isn't sufficient for your use case, you can contact support to discuss alternatives. --- @@ -246,7 +246,7 @@ So, the lifecycle of a successful deployment is Building → Awaiting deployment -If a deployment is stuck at a status like "Building" or "Deploying" for a long time, [contact support](../support/page.mdx) for assistance. +If a deployment is stuck at a status like "Building" or "Deploying" for a long time, contact support for assistance. @@ -260,13 +260,13 @@ If a deployment is stuck at a status like "Building" or "Deploying" for a long t If a deployment's status is "Build failed", you can check the [build logs](../logs/page.mdx) to understand why it failed. The build logs will show you the errors that occurred during the build process, which can help you fix the issue in your code. -You can also [contact support](../support/page.mdx) for help with the issue, if necessary. +You can also contact support for help with the issue, if necessary. ### Troubleshooting Deployment Failures If a deployment's status is "Deploy failed", you can check the [runtime logs](../logs/page.mdx) to understand why it failed. The runtime logs will show you the errors that occurred during the deployment process, which can help you fix the issue in your code. -You can also [contact support](../support/page.mdx) for help with the issue, if necessary. +You can also contact support for help with the issue, if necessary. --- @@ -278,7 +278,7 @@ By redeploying a previous deployment, you revert or rollback the live version of -Redeploying a deployment will not revert database changes made in the latest deployment. If you need to revert database changes, [contact support](../support/page.mdx) for assistance based on your use case. +Redeploying a deployment will not revert database changes made in the latest deployment. If you need to revert database changes, contact support for assistance based on your use case. diff --git a/www/apps/cloud/app/draft-order-plugin/page.mdx b/www/apps/cloud/app/draft-order-plugin/page.mdx index fe8cdd889a..98e181492b 100644 --- a/www/apps/cloud/app/draft-order-plugin/page.mdx +++ b/www/apps/cloud/app/draft-order-plugin/page.mdx @@ -34,4 +34,4 @@ The Draft Order Plugin provides the following features: The Draft Order Plugin is currently only available for Cloud users. If you're not a Cloud user, [learn how to get started](../page.mdx#sign-up-for-cloud). -Then, you can [contact support](../support/page.mdx) for assistance in installing the Draft Order Plugin in your deployed Medusa application. \ No newline at end of file +Then, you can contact support for assistance in installing the Draft Order Plugin in your deployed Medusa application. \ No newline at end of file diff --git a/www/apps/cloud/app/environments/environment-variables/page.mdx b/www/apps/cloud/app/environments/environment-variables/page.mdx new file mode 100644 index 0000000000..ac27c4002e --- /dev/null +++ b/www/apps/cloud/app/environments/environment-variables/page.mdx @@ -0,0 +1,125 @@ +import { InlineIcon } from "docs-ui" +import { EllipsisHorizontal } from "@medusajs/icons" + +export const metadata = { + title: `Manage Environment Variables`, +} + +# {metadata.title} + +In this guide, you'll learn how to manage environment variables of long-lived and preview environments in Cloud. + +Environment variables are key-value pairs of sensitive information, such as API keys and credentials. Instead of hardcoding these variables in your codebase, you should store them as environment variables. + +You can manage an environment's variables in its "Settings" tab. + +## Restricted Environment Variable Names + +The following environment variable names are reserved by Cloud and you can't use them in your environment: + +- `NODE_ENV` +- `EXECUTION_CONTEXT` +- `DATABASE_URL` +- `REDIS_URL` +- `MEDUSA_WORKER_MODE` +- `PORT` +- `K_SERVICE` +- `K_CONFIGURATION` +- `K_REVISION` +- `K_CONTAINER_NAME` +- `K_INTERNAL_POD_NAME` +- `K_INTERNAL_POD_NAMESPACE` +- `K_LOCAL_ADDR` +- `K_PROTOCOL` +- `SESSION_STORE` +- `DYNAMO_DB_SESSIONS_TABLE` +- `DYNAMO_DB_SESSIONS_HASH_KEY` +- `DYNAMO_DB_SESSIONS_PREFIX` +- `AWS_ACCESS_KEY_ID` +- `AWS_SECRET_ACCESS_KEY` +- `AWS_REGION` + +--- + +## Add Environment Variables + +To add environment variables to an environment: + +1. In the [environment's dashboard](../long-lived/page.mdx#open-environment-dashboard), click on the "Settings" tab. +2. In the "Add new environment variables" section, there are different ways you can add environment variables: + - **Manually**: + - Enter the key and value of the environment variable in the respective fields. + - Click the "Add another" button to add another variable. + - **Paste `.env` format**: + - If you copied environment variables in a `.env` file format, you can paste them directly into the "Key" field. The environment variables will be pre-filled for you. + - **Import `.env` file**: + - If you have a `.env` file that defines your environment variables, click the "Import .env" button to upload the file. The environment variables will be automatically extracted and added to the list. +3. Once you're done, click the "Save" button to save the environment variables. + + + +After adding the environment variables, you must [redeploy the environment](../long-lived/page.mdx#redeploy-environment) for the changes to take effect. + + + +![Environment variables section in the environment's settings tab](https://res.cloudinary.com/dza7lstvk/image/upload/v1749816071/Cloud/CleanShot_2025-06-13_at_15.00.54_2x_dbdxl4.png) + +--- + +## Edit Environment Variables + +To edit an environment variable: + +1. In the [environment's dashboard](../long-lived/page.mdx#open-environment-dashboard), click on the "Settings" tab. +2. In the "Environment variables" section, find the variable you want to edit. +3. Click the icon at the variable's right side. +4. Choose "Edit" from the dropdown menu. + +![Edit environment variable in the environment's settings tab](https://res.cloudinary.com/dza7lstvk/image/upload/v1749816223/Cloud/CleanShot_2025-06-13_at_15.03.21_2x_a38dch.png) + +5. In the side window that opens, you can edit the variable's key, value, and whether it's sensitive. +6. Once you're done, click the "Save" button. + + + +After editing the environment variable, you must [redeploy the environment](../long-lived/page.mdx#redeploy-environment) for the changes to take effect. + + + +![Edit environment variable side window](https://res.cloudinary.com/dza7lstvk/image/upload/v1749816330/Cloud/CleanShot_2025-06-13_at_15.05.20_2x_ps04uf.png) + +--- + +## Delete Environment Variables + +To delete an environment variable: + +1. In the [environment's dashboard](../long-lived/page.mdx#open-environment-dashboard), click on the "Settings" tab. +2. In the "Environment variables" section, find the variable you want to delete. +3. Click the icon at the variable's right side. +4. Choose "Delete" from the dropdown menu. + + + +After deleting the environment variable, you must [redeploy the environment](../long-lived/page.mdx#redeploy-environment) for the changes to take effect. + + + +![Delete environment variable in the environment's settings tab](https://res.cloudinary.com/dza7lstvk/image/upload/v1749816223/Cloud/CleanShot_2025-06-13_at_15.03.21_2x_a38dch.png) + +--- + +## Export Environment Variables + +You can export an environment's variables as a `.env` file. This is useful for debugging issues that require you to have the same environment variables. + +To export an environment's variables: + +1. In the [environment's dashboard](../long-lived/page.mdx#open-environment-dashboard), click on the "Settings" tab. +2. In the "Environment variables" section, click on the "Export .env" button at the top right of the section. + +A file download will start with the name `env.txt`, which contains the environment variables in `.env` format. + +You can rename the file to `.env` and use it in your local development. + +![Export env button in the environment's settings tab](https://res.cloudinary.com/dza7lstvk/image/upload/v1749816591/Cloud/CleanShot_2025-06-13_at_15.09.37_2x_k5t0nz.png) \ No newline at end of file diff --git a/www/apps/cloud/app/environments/long-lived/page.mdx b/www/apps/cloud/app/environments/long-lived/page.mdx new file mode 100644 index 0000000000..d9c8207d50 --- /dev/null +++ b/www/apps/cloud/app/environments/long-lived/page.mdx @@ -0,0 +1,232 @@ +import { InlineIcon } from "docs-ui" +import { EllipsisHorizontal } from "@medusajs/icons" + +export const metadata = { + title: `Long-Lived Environments`, +} + +# {metadata.title} + +In this guide, you'll learn about long-lived environments in Cloud and how to manage them. + +Long-lived environments are stable environments that you create for specific branches in your GitHub repository, such as Production or Staging. They allow you to test changes in a production-like environment before deploying them to the live application. + + + +Learn more about what environments are and their types in the [Environments](../page.mdx) guide. + + + +## Long-Lived Environments Infrastructure + +Production and long-lived environments are stable and scalable, making them ideal for hosting your Medusa applications. Medusa ensures that they're: + +- **Always available with zero-downtime deployments**: Your application will always be available for users, even during deployments. Medusa automatically handles rolling updates without interrupting your users. +- **Automatically scaled to meet peak traffic**: Medusa automatically scales your servers to handle traffic spikes, such as during flash sales or marketing campaigns. Your application can handle sudden increases in traffic without manual intervention. +- **Equipped with server and worker instances**: Your application runs on multiple server instances that handle incoming HTTP requests, while worker instances handle background tasks like scheduled jobs and subscribers. This separation allows your application to handle both web traffic and background processing efficiently. + +--- + +## Create a Long-Lived Environment + +It's recommended to create long-lived environments for different stages of your project's development. + +For example, you can create a Staging environment to test new features and updates before deploying them to Production. That way, you can test changes in a production-like environment without affecting the live application. + +This section explains how to create a long-lived environment in Cloud. + +### Prerequisites: Create Environment Branch + +A long-lived environment is associated with a specific branch in your GitHub repository. So, before creating an environment, make sure you have the necessary branch for it in your repository. + +For example, if you're creating a Staging environment, create and push a `staging` branch in your repository: + +```bash +git checkout -b staging # create branch +git push origin staging # push branch to remote +``` + +### Steps to Create a Long-Lived Environment + +To create a long-lived environment: + +1. In the [project's dashboard](../../projects/page.mdx#open-project-dashboard), click on the "Add environment" button at the top right. +2. In the side window that opens: + - Enter the name of the environment. For example, `Staging`. + - Select the branch you want to associate with this environment. For example, `staging`. + - If you don't see the branch you want to use, refresh the page to load the latest branches from your repository. + - Set the custom subdomain for the environment. All environments are subdomains of `medusajs.app`. So, if you set the subdomain to `staging-my-project`, the environment's URL will be `staging-my-project.medusajs.app`. + - Refer to the [Subdomain Restrictions](../../projects/page.mdx#subdomain-restrictions) guide for reserved subdomains and restrictions. +3. Once you're done, click the "Create" button. + +![Side window with the form to create an environment](https://res.cloudinary.com/dza7lstvk/image/upload/v1749812846/Cloud/CleanShot_2025-06-13_at_14.04.53_2x_apb634.png) + +The created environment will appear in the [project's dashboard](../../projects/page.mdx) as a card. + +### Trigger Environment Deployment + +After creating the environment, you need to trigger its deployment by pushing a commit to the environment's branch (in this example, `staging`). + +The first time you push a commit, Medusa will: + +- Deploy the environment from the associated branch. +- Set up the database and resources for the environment. These are different from the resources of other environments. + +After that, Medusa will automatically deploy the environment whenever you push a new commit to the associated branch. + +![Project dashboard showing the created environment](https://res.cloudinary.com/dza7lstvk/image/upload/v1749813096/Cloud/CleanShot_2025-06-13_at_14.11.09_2x_j6uoap.png) + +### Create Medusa Admin User in Environment + +After the environment is deployed, you need to set the email and password for the environment's Medusa Admin user. + +To set the email and password for the admin user: + +1. In the [project's dashboard](../../projects/page.mdx#open-project-dashboard), click on the environment you just created. +2. In the environment's dashboard, click on the "Settings" tab. +3. In the "Add new environment variables" section, add the following environment variables: + +```shell +USER_INITIAL_EMAIL=admin@test.com +USER_INITIAL_PASSWORD=secret +``` + + + +You can paste the above variables directly in the Key field and both environment variables will be filled. + + + +Make sure to replace the values with your desired email and password. + +4. Click the "Save" button to save the environment variables. + +### Redeploy Environment + +After adding the environment variables, you need to redeploy the environment for the changes to take effect: + +1. Go back to the environment's dashboard by clicking the "Overview" tab. +2. Click on the "Redeploy" button to redeploy the environment with the new environment variables. + +This will redeploy the environment's live deployment with the new admin user credentials. + +![Redeploy button at the top right of the environment's dashboard](https://res.cloudinary.com/dza7lstvk/image/upload/v1750081204/Cloud/CleanShot_2025-06-16_at_16.39.44_2x_d3yij6.png) + +Then, wait for the deployment to finish. You can check its status in the "Deployments" section. Once it's deployed, you can [access the environment](#access-deployed-environment) using its URL. + +--- + +## Access Deployed Environment + +Once an environment is deployed, you can access it through its URL. + +Learn more about how to access an environment's deployment in the [Deployments](../../deployments/page.mdx#access-live-deployment) guide. + +--- + +## Open Environment Dashboard + +On the environment's dashboard, you can view its details, logs, and settings. You can also manage the environment's variables, deployment rules, and database dump. + +To open an environment's dashboard: + +1. Make sure you're viewing the [correct organization's dashboard in Cloud](../../organizations/page.mdx#switch-organization). +2. Click on the project that contains the environment you want to view. +3. In the project's dashboard, click on the environment you want to view. + +This will open the environment's dashboard. You can see the environment's name at the top of the Cloud dashboard. + +![Environment dashboard with the name at the top left](https://res.cloudinary.com/dza7lstvk/image/upload/v1749813349/Cloud/CleanShot_2025-06-13_at_14.14.32_2x_ttqg3h.png) + +### Find Environment Details + +On the environment's dashboard, you can find the following details: + +![Environment dashboard with sections highlighted](https://res.cloudinary.com/dza7lstvk/image/upload/v1749814360/Cloud/CleanShot_2025-06-13_at_14.27.24_2x_rhpaga.png) + +1. **Environment URL**: The URL to access the environment. You can find it below the environment's name. +2. **Environment Status**: The current status of the environment, such as "Live" or "Deploying". You can find it at the top right of the environment's dashboard. +3. **Environment Deployments**: The list of deployments for the environment, including the latest deployment. You can find it in the "Deployments" section of the environment's dashboard. + +### Switch Environments + +The environment's name at the top of the dashboard is also an environment switcher. + +To switch to a different environment: + +1. Click on the environment's name at the top of the Cloud dashboard, next to the project name. +2. Choose the environment you want to switch to from the dropdown. + +![Environment switcher dropdown at the top of the dashboard](https://res.cloudinary.com/dza7lstvk/image/upload/v1749815237/Cloud/CleanShot_2025-06-13_at_14.46.54_2x_j4848b.png) + +This will change the view to the selected environment, and you'll see its details, logs, and settings. + +--- + +## View Environment Logs + +You can view build and runtime logs for an environment in the "Logs" section of the environment's dashboard. These logs help you debug issues in your application. + +Learn more in the [Logs guide](../../logs/page.mdx). + +--- + +## Manage Environment Variables + +In the environment's "Settings" tab, you can manage the environment variables for the environment. Environment variables are key-value pairs that store sensitive information, such as API keys, or configurations that your application needs to run. + +Learn how to manage environment variables in the [Environment Variables](../environment-variables/page.mdx) guide. + +--- + +## Change Environment's Branch + + + +You can't change the branch of preview environments. This section only applies to long-lived environments, such as Production or Staging. + + + +In an environment's "Settings" tab, you can manage the deployment rules for the environment. Deployment rules allow you to control how and when deployments are triggered for the environment. + +To change the branch associated with an environment using deployment rules: + +1. In the [environment's dashboard](#open-environment-dashboard), click on the "Settings" tab. +2. In the "Deployment rules" section, click the icon at the right side of the `branch` rule. +3. Choose "Edit" from the dropdown menu. +4. In the side window that opens, you can change the branch associated with the environment. +5. Once you're done, click the "Save" button. + +Changes will take effect the next time you push a commit to the new branch. The environment will be redeployed with the latest changes from the new branch. + +![Change environment branch in the environment's settings tab](https://res.cloudinary.com/dza7lstvk/image/upload/v1750170517/Cloud/CleanShot_2025-06-17_at_17.28.25_2x_nfx79a.png) + +--- + +## Import and Export Environment's Database Dump + +In the environment's "Settings" tab, you can export a database dump of the environment. This is useful for backing up the environment's data, debugging issues, or migrating the data to another environment. + +You can also import a database dump to use existing data that you have, or to restore the environment to a previous state. + +Learn more in the [Database](../../database/page.mdx) guide. + +--- + +## Delete an Environment + + + +Deleting an environment will delete all its resources and settings, including its database and environment variables. This action is irreversible. You won't be able to recover any data after deletion. + + + +You can delete any environment in your project, except for the Production environment. + +To delete an environment: + +1. In the environment's dashboard, click on the "Settings" tab. +2. Scroll down to the "Delete environment" section. +3. Click the "Delete Environment" button. + +![Delete environment button in the environment's settings tab](https://res.cloudinary.com/dza7lstvk/image/upload/v1749816910/Cloud/CleanShot_2025-06-13_at_15.14.50_2x_qm8hfi.png) diff --git a/www/apps/cloud/app/environments/page.mdx b/www/apps/cloud/app/environments/page.mdx index 0bbe1ee13b..313c93eda3 100644 --- a/www/apps/cloud/app/environments/page.mdx +++ b/www/apps/cloud/app/environments/page.mdx @@ -1,6 +1,3 @@ -import { InlineIcon } from "docs-ui" -import { EllipsisHorizontal } from "@medusajs/icons" - export const metadata = { title: `Environments`, } @@ -21,8 +18,8 @@ Environments are useful to test changes in production-like conditions before act There are two types of environments: -- Long-lived environments: These are environments that you create for specific branches in your GitHub repository, such as Production or Staging environments. -- Short-lived [Preview environments](#preview-environments): These are environments automatically created for each pull request (PR) towards a branch that has a long-lived environment in Cloud. They're created as a preview for the PR, and are destroyed once the PR is merged or closed. +- [Long-lived environments](./long-lived/page.mdx): These are environments that you create for specific branches in your GitHub repository, such as Production or Staging environments. +- [Short-lived Preview environments](./preview/page.mdx): These are environments automatically created for each pull request (PR) towards a branch that has a long-lived environment in Cloud. They're created as a preview for the PR, and are destroyed once the PR is merged or closed. --- @@ -36,401 +33,3 @@ To view a project's environments: In the project's dashboard, you'll find a card for every environment in your project. For example, you may have Production, Staging, and Previews cards. ![Project dashboard showing the environment cards](https://res.cloudinary.com/dza7lstvk/image/upload/v1750081123/Cloud/CleanShot_2025-06-16_at_16.37.50_2x_wgqkws.png) - ---- - -## Create a Long-Lived Environment - -It's recommended to create long-lived environments for different stages of your project's development. - -For example, you can create a Staging environment to test new features and updates before deploying them to Production. That way, you can test changes in a production-like environment without affecting the live application. - -This section explains how to create a long-lived environment in Cloud. - -### Prerequisites: Create Environment Branch - -A long-lived environment is associated with a specific branch in your GitHub repository. So, before creating an environment, make sure you have the necessary branch for it in your repository. - -For example, if you're creating a Staging environment, create and push a `staging` branch in your repository: - -```bash -git checkout -b staging # create branch -git push origin staging # push branch to remote -``` - -### Steps to Create a Long-Lived Environment - -To create a long-lived environment: - -1. In the [project's dashboard](../projects/page.mdx#open-project-dashboard), click on the "Add environment" button at the top right. -2. In the side window that opens: - - Enter the name of the environment. For example, `Staging`. - - Select the branch you want to associate with this environment. For example, `staging`. - - If you don't see the branch you want to use, refresh the page to load the latest branches from your repository. - - Set the custom subdomain for the environment. All environments are subdomains of `medusajs.app`. So, if you set the subdomain to `staging-my-project`, the environment's URL will be `staging-my-project.medusajs.app`. - - Refer to the [Subdomain Restrictions](../projects/page.mdx#subdomain-restrictions) guide for reserved subdomains and restrictions. -3. Once you're done, click the "Create" button. - -![Side window with the form to create an environment](https://res.cloudinary.com/dza7lstvk/image/upload/v1749812846/Cloud/CleanShot_2025-06-13_at_14.04.53_2x_apb634.png) - -The created environment will appear in the [project's dashboard](../projects/page.mdx) as a card. - -### Trigger Environment Deployment - -After creating the environment, you need to trigger its deployment by pushing a commit to the environment's branch (in this example, `staging`). - -The first time you push a commit, Cloud will: - -- Deploy the environment from the associated branch. -- Set up the database and resources for the environment. These are different from the resources of other environments. - -After that, Cloud will automatically deploy the environment whenever you push a new commit to the associated branch. - -![Project dashboard showing the created environment](https://res.cloudinary.com/dza7lstvk/image/upload/v1749813096/Cloud/CleanShot_2025-06-13_at_14.11.09_2x_j6uoap.png) - -### Create Medusa Admin User in Environment - -After the environment is deployed, you need to set the email and password for the environment's Medusa Admin user. - -To set the email and password for the admin user: - -1. In the [project's dashboard](../projects/page.mdx#open-project-dashboard), click on the environment you just created. -2. In the environment's dashboard, click on the "Settings" tab. -3. In the "Add new environment variables" section, add the following environment variables: - -```shell -USER_INITIAL_EMAIL=admin@test.com -USER_INITIAL_PASSWORD=secret -``` - - - -You can paste the above variables directly in the Key field and both environment variables will be filled. - - - -Make sure to replace the values with your desired email and password. - -4. Click the "Save" button to save the environment variables. - -### Redeploy Environment - -After adding the environment variables, you need to redeploy the environment for the changes to take effect: - -1. Go back to the environment's dashboard by clicking the "Overview" tab. -2. Click on the "Redeploy" button to redeploy the environment with the new environment variables. - -This will redeploy the environment's live deployment with the new admin user credentials. - -![Redeploy button at the top right of the environment's dashboard](https://res.cloudinary.com/dza7lstvk/image/upload/v1750081204/Cloud/CleanShot_2025-06-16_at_16.39.44_2x_d3yij6.png) - -Then, wait for the deployment to finish. You can check its status in the "Deployments" section. Once it's deployed, you can [access the environment](#access-deployed-environment) using its URL. - ---- - -## Access Deployed Environment - -Once an environment is deployed, you can access it through its URL. - -Learn more about how to access an environment's deployment in the [Deployments](../deployments/page.mdx#access-live-deployment) guide. - ---- - -## Open Environment Dashboard - -On the environment's dashboard, you can view its details, logs, and settings. You can also manage the environment's variables, deployment rules, and database dump. - -To open an environment's dashboard: - -1. Make sure you're viewing the [correct organization's dashboard in Cloud](../organizations/page.mdx#switch-organization). -2. Click on the project that contains the environment you want to view. -3. In the project's dashboard, click on the environment you want to view. - -This will open the environment's dashboard. You can see the environment's name at the top of the Cloud dashboard. - -![Environment dashboard with the name at the top left](https://res.cloudinary.com/dza7lstvk/image/upload/v1749813349/Cloud/CleanShot_2025-06-13_at_14.14.32_2x_ttqg3h.png) - -### Find Environment Details - -On the environment's dashboard, you can find the following details: - -![Environment dashboard with sections highlighted](https://res.cloudinary.com/dza7lstvk/image/upload/v1749814360/Cloud/CleanShot_2025-06-13_at_14.27.24_2x_rhpaga.png) - -1. **Environment URL**: The URL to access the environment. You can find it below the environment's name. -2. **Environment Status**: The current status of the environment, such as "Live" or "Deploying". You can find it at the top right of the environment's dashboard. -3. **Environment Deployments**: The list of deployments for the environment, including the latest deployment. You can find it in the "Deployments" section of the environment's dashboard. - -### Switch Environments - -The environment's name at the top of the dashboard is also an environment switcher. - -To switch to a different environment: - -1. Click on the environment's name at the top of the Cloud dashboard, next to the project name. -2. Choose the environment you want to switch to from the dropdown. - -![Environment switcher dropdown at the top of the dashboard](https://res.cloudinary.com/dza7lstvk/image/upload/v1749815237/Cloud/CleanShot_2025-06-13_at_14.46.54_2x_j4848b.png) - -This will change the view to the selected environment, and you'll see its details, logs, and settings. - ---- - -## View Environment Logs - -You can view build and runtime logs for an environment in the "Logs" section of the environment's dashboard. These logs help you debug issues in your application. - -Learn more in the [Logs guide](../logs/page.mdx). - ---- - -## Manage Environment Variables - -In an environment's "Settings" tab, you can manage the environment's variables. - -### Restricted Environment Variable Names - -The following environment variable names are reserved by Cloud and you can't use them in your environment: - -- `NODE_ENV` -- `EXECUTION_CONTEXT` -- `DATABASE_URL` -- `REDIS_URL` -- `MEDUSA_WORKER_MODE` -- `PORT` -- `K_SERVICE` -- `K_CONFIGURATION` -- `K_REVISION` -- `K_CONTAINER_NAME` -- `K_INTERNAL_POD_NAME` -- `K_INTERNAL_POD_NAMESPACE` -- `K_LOCAL_ADDR` -- `K_PROTOCOL` -- `SESSION_STORE` -- `DYNAMO_DB_SESSIONS_TABLE` -- `DYNAMO_DB_SESSIONS_HASH_KEY` -- `DYNAMO_DB_SESSIONS_PREFIX` -- `AWS_ACCESS_KEY_ID` -- `AWS_SECRET_ACCESS_KEY` -- `AWS_REGION` - -### Add Environment Variables - -To add environment variables to an environment: - -1. In the [environment's dashboard](#open-environment-dashboard), click on the "Settings" tab. -2. In the "Add new environment variables" section, there are different ways you can add environment variables: - - **Manually**: - - Enter the key and value of the environment variable in the respective fields. - - Click the "Add another" button to add another variable. - - **Paste `.env` format**: - - If you copied environment variables in a `.env` file format, you can paste them directly into the "Key" field. The environment variables will be pre-filled for you. - - **Import `.env` file**: - - If you have a `.env` file that defines your environment variables, click the "Import .env" button to upload the file. The environment variables will be automatically extracted and added to the list. -3. Once you're done, click the "Save" button to save the environment variables. - - - -After adding the environment variables, you must [redeploy the environment](#redeploy-environment) for the changes to take effect. - - - -![Environment variables section in the environment's settings tab](https://res.cloudinary.com/dza7lstvk/image/upload/v1749816071/Cloud/CleanShot_2025-06-13_at_15.00.54_2x_dbdxl4.png) - -### Edit Environment Variables - -To edit an environment variable: - -1. In the [environment's dashboard](#open-environment-dashboard), click on the "Settings" tab. -2. In the "Environment variables" section, find the variable you want to edit. -3. Click the icon at the variable's right side. -4. Choose "Edit" from the dropdown menu. - -![Edit environment variable in the environment's settings tab](https://res.cloudinary.com/dza7lstvk/image/upload/v1749816223/Cloud/CleanShot_2025-06-13_at_15.03.21_2x_a38dch.png) - -5. In the side window that opens, you can edit the variable's key, value, and whether it's sensitive. -6. Once you're done, click the "Save" button. - - - -After editing the environment variable, you must [redeploy the environment](#redeploy-environment) for the changes to take effect. - - - -![Edit environment variable side window](https://res.cloudinary.com/dza7lstvk/image/upload/v1749816330/Cloud/CleanShot_2025-06-13_at_15.05.20_2x_ps04uf.png) - -### Delete Environment Variables - -To delete an environment variable: - -1. In the [environment's dashboard](#open-environment-dashboard), click on the "Settings" tab. -2. In the "Environment variables" section, find the variable you want to delete. -3. Click the icon at the variable's right side. -4. Choose "Delete" from the dropdown menu. - - - -After deleting the environment variable, you must [redeploy the environment](#redeploy-environment) for the changes to take effect. - - - -![Delete environment variable in the environment's settings tab](https://res.cloudinary.com/dza7lstvk/image/upload/v1749816223/Cloud/CleanShot_2025-06-13_at_15.03.21_2x_a38dch.png) - -### Export Environment Variables - -You can export an environment's variables as a `.env` file. This is useful for debugging issues that require you to have the same environment variables. - -To export an environment's variables: - -1. In the [environment's dashboard](#open-environment-dashboard), click on the "Settings" tab. -2. In the "Environment variables" section, click on the "Export .env" button at the top right of the section. - -A file download will start with the name `env.txt`, which contains the environment variables in `.env` format. - -You can rename the file to `.env` and use it in your local development. - -![Export env button in the environment's settings tab](https://res.cloudinary.com/dza7lstvk/image/upload/v1749816591/Cloud/CleanShot_2025-06-13_at_15.09.37_2x_k5t0nz.png) - ---- - -## Change Environment's Branch - - - -You can't change the branch of preview environments. This section only applies to long-lived environments, such as Production or Staging. - - - -In an environment's "Settings" tab, you can manage the deployment rules for the environment. Deployment rules allow you to control how and when deployments are triggered for the environment. - -To change the branch associated with an environment using deployment rules: - -1. In the [environment's dashboard](#open-environment-dashboard), click on the "Settings" tab. -2. In the "Deployment rules" section, click the icon at the right side of the `branch` rule. -3. Choose "Edit" from the dropdown menu. -4. In the side window that opens, you can change the branch associated with the environment. -5. Once you're done, click the "Save" button. - -Changes will take effect the next time you push a commit to the new branch. The environment will be redeployed with the latest changes from the new branch. - -![Change environment branch in the environment's settings tab](https://res.cloudinary.com/dza7lstvk/image/upload/v1750170517/Cloud/CleanShot_2025-06-17_at_17.28.25_2x_nfx79a.png) - ---- - -## Import and Export Environment's Database Dump - -In the environment's "Settings" tab, you can export a database dump of the environment. This is useful for backing up the environment's data, debugging issues, or migrating the data to another environment. - -You can also import a database dump to use existing data that you have, or to restore the environment to a previous state. - -Learn more in the [Database](../database/page.mdx) guide. - ---- - -## Preview Environments - -A preview environment is a short-lived environment that is automatically created for each pull request (PR) opened towards a branch with a long-lived environment in Cloud. - -Preview environments facilitate testing a PR's changes in a live environment before merging them. They allow you to test changes in an environment that closely resembles the target long-lived environment. - -### View Preview Environments - -To view the preview environments for a project, go to the [project's dashboard](../projects/page.mdx#open-project-dashboard). You'll see a "Previews" card with all the preview environments for the project. - -![Project dashboard with the Previews card highlighted](https://res.cloudinary.com/dza7lstvk/image/upload/v1750081308/Cloud/CleanShot_2025-06-16_at_16.41.30_2x_ocwoqf.png) - -### Create Preview Environment - -To create a new preview environment, create a PR towards a branch that has a long-lived environment in Cloud, such as Production. - -Cloud will automatically create a preview environment for the PR and deploy the changes to that environment. Everytime you push a new commit to the PR, Cloud will redeploy the preview environment with the latest changes. - -You can also view the preview deployment and its status in the comment made on your PR in GitHub. - -![Preview environment deployment comment in GitHub PR](https://res.cloudinary.com/dza7lstvk/image/upload/v1749817407/Cloud/CleanShot_2025-06-13_at_15.23.10_2x_rbjorr.png) - -### Access Deployed Preview Environment - -Once the preview environment has finished deploying, you can access its Medusa Admin either through the comment in the PR or by clicking the "Preview" button in the [project's dashboard](../projects/page.mdx#open-project-dashboard). - -![Preview button in the project's dashboard](https://res.cloudinary.com/dza7lstvk/image/upload/v1750158423/Cloud/CleanShot_2025-06-17_at_14.06.41_2x_yaw699.png) - -This will open the preview environment's Medusa Admin in a new tab, where you can test the changes made in the PR. - -To log into the Medusa Admin of the preview environment, use the admin credentials of the Production environment. If you [configured the shared previews settings](#manage-shared-previews-settings) to use a different environment's database, you can log in with the admin credentials of that environment instead. - -You can also [send requests to the preview deployment's API](../deployments/page.mdx#send-requests-to-the-deployment). - -### Open Preview Environment Dashboard - -Similar to long-lived environments, you can open a preview environment's dashboard to view its details, logs, and edit its settings. - -To open a preview environment's dashboard: - -1. Go to its [project's dashboard](../projects/page.mdx#open-project-dashboard). -2. In the "Previews" card, click on the preview environment you want to view. - -Then, you can manage the preview environment just like any other long-lived environment, as mentioned throughout this guide. You can [manage its environment variables](#manage-environment-variables) and [import/export its database dump](#import-and-export-environments-database-dump). - -![Preview environment dashboard](https://res.cloudinary.com/dza7lstvk/image/upload/v1749817815/Cloud/CleanShot_2025-06-13_at_15.29.58_2x_h9vn34.png) - -### Manage Shared Previews Settings - -While you can manage each preview environment's settings individually, you can also manage shared settings between all preview environments in the project. By using the shared settings, you don't need to replicate the same settings for each preview environment. - -For example, you can define environment variables that are common to all preview environments. - -To manage the shared settings for preview environments: - -1. In a [project's dashboard](../projects/page.mdx#open-project-dashboard), click on the "Settings" tab. -2. Choose the "Previews" tab from the sidebar. -3. In the Previews settings, you can: - - Manage environment variables, as explained in the [Manage Environment Variables](#manage-environment-variables) section. All preview environments created after making changes will inherit these variables. - - Specify which database to create the preview environment's database from. By default, a new database will be created from the Production environment's database. You can change this to use a different environment's database, such as Staging. - - - -Making changes to the shared settings will affect all preview environments created after the changes. Existing preview environments will not be affected by the changes. - - - -![Previews settings in the project's settings tab](https://res.cloudinary.com/dza7lstvk/image/upload/v1749818069/Cloud/CleanShot_2025-06-13_at_15.34.15_2x_zdh3ha.png) - -### Preview Environment's Database - -Each preview environment has its own resources, including its own database, separate from the production environment. - -By default, the preview environment's database will be replicated from the Production environment's database. This means you can test changes in the preview environment with the same data in production, without actually affecting the production database. - -You can change the environment from which the preview environment's database is replicated in the [shared Previews settings](#manage-shared-previews-settings). - -#### Preview Environment Inactivity - -Since Preview environments are only meant for testing, they are put to sleep after ten minutes of inactivity. - -So, if you're testing scheduled jobs or events, they may not work as expected in preview environments. They will work as expected in long-lived environments, such as Staging or Production. - -### Delete Preview Environment - -Preview environments are automatically deleted when their PR is merged or closed. However, you can also delete them manually if needed. - -To delete a preview environment, you can follow the same steps in the [Delete an Environment](#delete-an-environment) section. - ---- - -## Delete an Environment - - - -Deleting an environment will delete all its resources and settings, including its database and environment variables. This action is irreversible. You won't be able to recover any data after deletion. - - - -You can delete any environment in your project, except for the Production environment. - -To delete an environment: - -1. In the environment's dashboard, click on the "Settings" tab. -2. Scroll down to the "Delete environment" section. -3. Click the "Delete Environment" button. - -![Delete environment button in the environment's settings tab](https://res.cloudinary.com/dza7lstvk/image/upload/v1749816910/Cloud/CleanShot_2025-06-13_at_15.14.50_2x_qm8hfi.png) diff --git a/www/apps/cloud/app/environments/preview/page.mdx b/www/apps/cloud/app/environments/preview/page.mdx new file mode 100644 index 0000000000..3a5a1900b2 --- /dev/null +++ b/www/apps/cloud/app/environments/preview/page.mdx @@ -0,0 +1,119 @@ +export const metadata = { + title: `Preview Environments`, +} + +# {metadata.title} + +A preview environment is a short-lived environment that is automatically created for each pull request (PR) opened towards a branch with a long-lived environment in Cloud. + +Preview environments facilitate testing a PR's changes in a live environment before merging them. They allow you to test changes in an environment that closely resembles the target long-lived environment. + + + +Learn more about what environments are and their types in the [Environments](../page.mdx) guide. + + + +## Preview (Short-Lived) Environment Infrastructure + +Preview environments are designed for testing changes before merging them into production. So, they have a simpler setup compared to [production environments](../long-lived/page.mdx): + +- Medusa automatically scales preview environments to zero after ten minutes of inactivity. So, if no one is using the preview environment, it will automatically shut down to save resources. +- Preview environments run on a single server instance, which is sufficient for testing changes. + +### Preview Environment Inactivity + +Since Preview environments are only meant for testing, they are put to sleep after ten minutes of inactivity. + +So, if you're testing scheduled jobs or events, they may not work as expected in preview environments. They will work as expected in long-lived environments, such as Staging or Production. + +--- + +## View Preview Environments + +To view the preview environments for a project, go to the [project's dashboard](../../projects/page.mdx#open-project-dashboard). You'll see a "Previews" card with all the preview environments for the project. + +![Project dashboard with the Previews card highlighted](https://res.cloudinary.com/dza7lstvk/image/upload/v1750081308/Cloud/CleanShot_2025-06-16_at_16.41.30_2x_ocwoqf.png) + +--- + +## Create Preview Environment + +To create a new preview environment, create a PR towards a branch that has a long-lived environment in Cloud, such as Production. + +Medusa will automatically create a preview environment for the PR and deploy the changes to that environment. Everytime you push a new commit to the PR, Medusa will redeploy the preview environment with the latest changes. + +You can also view the preview deployment and its status in the comment made on your PR in GitHub. + +![Preview environment deployment comment in GitHub PR](https://res.cloudinary.com/dza7lstvk/image/upload/v1749817407/Cloud/CleanShot_2025-06-13_at_15.23.10_2x_rbjorr.png) + +--- + +## Access Deployed Preview Environment + +Once the preview environment has finished deploying, you can access its Medusa Admin either through the comment in the PR or by clicking the "Preview" button in the [project's dashboard](../../projects/page.mdx#open-project-dashboard). + +![Preview button in the project's dashboard](https://res.cloudinary.com/dza7lstvk/image/upload/v1750158423/Cloud/CleanShot_2025-06-17_at_14.06.41_2x_yaw699.png) + +This will open the preview environment's Medusa Admin in a new tab, where you can test the changes made in the PR. + +To log into the Medusa Admin of the preview environment, use the admin credentials of the Production environment. If you [configured the shared previews settings](#manage-shared-previews-settings) to use a different environment's database, you can log in with the admin credentials of that environment instead. + +You can also [send requests to the preview deployment's API](../../deployments/page.mdx#send-requests-to-the-deployment). + +--- + +## Open Preview Environment Dashboard + +Similar to long-lived environments, you can open a preview environment's dashboard to view its details, logs, and edit its settings. + +To open a preview environment's dashboard: + +1. Go to its [project's dashboard](../../projects/page.mdx#open-project-dashboard). +2. In the "Previews" card, click on the preview environment you want to view. + +Then, you can manage the preview environment just like any other long-lived environment, as mentioned throughout this guide. You can [manage its environment variables](../environment-variables/page.mdx) and [import/export its database dump](../../database/page.mdx). + +![Preview environment dashboard](https://res.cloudinary.com/dza7lstvk/image/upload/v1749817815/Cloud/CleanShot_2025-06-13_at_15.29.58_2x_h9vn34.png) + +--- + +## Manage Shared Previews Settings + +While you can manage each preview environment's settings individually, you can also manage shared settings between all preview environments in the project. By using the shared settings, you don't need to replicate the same settings for each preview environment. + +For example, you can define environment variables that are common to all preview environments. + +To manage the shared settings for preview environments: + +1. In a [project's dashboard](../../projects/page.mdx#open-project-dashboard), click on the "Settings" tab. +2. Choose the "Previews" tab from the sidebar. +3. In the Previews settings, you can: + - Manage environment variables, as explained in the [Manage Environment Variables](../environment-variables/page.mdx) guide. All preview environments created after making changes will inherit these variables. + - Specify which database to create the preview environment's database from. By default, a new database will be created from the Production environment's database. You can change this to use a different environment's database, such as Staging. + + + +Making changes to the shared settings will affect all preview environments created after the changes. Existing preview environments will not be affected by the changes. + + + +![Previews settings in the project's settings tab](https://res.cloudinary.com/dza7lstvk/image/upload/v1749818069/Cloud/CleanShot_2025-06-13_at_15.34.15_2x_zdh3ha.png) + +--- + +## Preview Environment's Database + +Each preview environment has its own resources, including its own database, separate from the production environment. + +By default, the preview environment's database will be replicated from the Production environment's database. This means you can test changes in the preview environment with the same data in production, without actually affecting the production database. + +You can change the environment from which the preview environment's database is replicated in the [shared Previews settings](#manage-shared-previews-settings). + +--- + +## Delete Preview Environment + +Preview environments are automatically deleted when their PR is merged or closed. However, you can also delete them manually if needed. + +To delete a preview environment, you can follow the same steps in the [Long-Lived Environment](../long-lived/page.mdx) section. diff --git a/www/apps/cloud/app/faq/page.mdx b/www/apps/cloud/app/faq/page.mdx new file mode 100644 index 0000000000..c0cc65e590 --- /dev/null +++ b/www/apps/cloud/app/faq/page.mdx @@ -0,0 +1,53 @@ +export const metadata = { + title: `Frequently Asked Questions`, +} + +# {metadata.title} + +In this guide, you'll find answers to frequently asked questions about Cloud. + +## Do I need to learn about Medusa to use Cloud? + +Since you deploy Medusa projects on Cloud, you need a developer who is familiar with Medusa to set up your project and add customizations for your business needs. Learn about Medusa in the [Getting Started](!docs!/learn) guide. + +You can also contact a [Medusa Expert](https://medusajs.com/experts/) to help you with building your Medusa project and deploying it on Cloud. + +--- + +## Does Cloud support hosting storefronts? + +Medusa can only host Medusa servers and admin dashboards. To host your storefront, you can use hosting providers like Vercel. + +Learn more in the [Connect Production Storefront](../connect-storefront/page.mdx) guide. + +--- + +## What resources does Cloud provide? + +Cloud fully-manages your [PostgreSQL databases](../database/page.mdx), [Redis instances](../redis/page.mdx), and [S3 buckets](../s3/page.mdx). You don't need to configure or maintain them. + +--- + +## Do I own my code and data for my Medusa project on Cloud? + +Yes, your code is hosted on your GitHub repository. You can also export a dump of your Cloud database at any time. + +--- + +## Can I deploy multiple projects on Cloud? + +Yes, if your plan supports multiple projects. Learn more in the [Pricing](https://medusajs.com/pricing/) page. + +--- + +## Can I use my custom plugins and modules on Cloud? + +Yes, you can use any custom and out-of-the-box plugins and modules in your Medusa project deployed on Cloud. You retain the same flexibility as you would with a self-hosted Medusa project. + +You can deploy projects like marketplaces, B2B, subscription-based stores, and more on Cloud. + +--- + +## Does Cloud create new Medusa projects for each deployment? + +No, Medusa does not create new Medusa projects for your deployments. Instead, it deploys your existing Medusa project from your GitHub repository. diff --git a/www/apps/cloud/app/infrastructure/page.mdx b/www/apps/cloud/app/infrastructure/page.mdx deleted file mode 100644 index 142a0c9ff5..0000000000 --- a/www/apps/cloud/app/infrastructure/page.mdx +++ /dev/null @@ -1,36 +0,0 @@ -export const metadata = { - title: `Infrastructure`, -} - -# {metadata.title} - -In this guide, you'll learn about the infrastructure that powers your Cloud projects. - -## Project's Infrastructure - -Every Cloud project you create is made up of multiple [environments](../environments/page.mdx), each having their own infrastructure. Cloud automatically provisions and manages the infrastructure of every environment, so you don't have to worry about setting up servers or scaling. - -Your project will have at least a production environment, which is your live application. You may create custom [long-lived environments](../environments/page.mdx#create-a-long-lived-environment) for staging or other uses. You may also create [short-lived preview environments](../environments/page.mdx#preview-environments) for testing changes before merging them into production. - -This guide only covers the server specs for production, long-lived, and preview environments. You can also learn about other resources of an environment, such as [database](../database/page.mdx), [redis](../redis/page.mdx), and [S3 storage](../s3/page.mdx). - ---- - -## Production (Long-Lived) Environment Infrastructure - -Production and long-lived environments are stable and scalable, making them ideal for hosting your Medusa applications. Cloud ensures that they're: - -- **Always available with zero-downtime deployments**: Your application will always be available for users, even during deployments. Cloud automatically handles rolling updates without interrupting your users. -- **Automatically scaled to meet peak traffic**: Cloud automatically scales your servers to handle traffic spikes, such as during flash sales or marketing campaigns. Your application can handle sudden increases in traffic without manual intervention. -- **Equipped with server and worker instances**: Your application runs on multiple server instances that handle incoming HTTP requests, while worker instances handle background tasks like scheduled jobs and subscribers. This separation allows your application to handle both web traffic and background processing efficiently. - ---- - -## Preview (Short-Lived) Environment Infrastructure - -Preview environments are designed for testing changes before merging them into production. So, they have a simpler setup compared to production environments: - -- Cloud automatically scales preview environments to zero after ten minutes of inactivity. So, if no one is using the preview environment, it will automatically shut down to save resources. -- Preview environments run on a single server instance, which is sufficient for testing changes. - -The simpler setup is sufficient for testing changes. However, some customizations like scheduled jobs and subscribers may not work as expected since the preview environment may be inactive. You can still use these customizations in long-lived environments normally. \ No newline at end of file diff --git a/www/apps/cloud/app/loyalty-plugin/page.mdx b/www/apps/cloud/app/loyalty-plugin/page.mdx index e03bf74c72..859e015f91 100644 --- a/www/apps/cloud/app/loyalty-plugin/page.mdx +++ b/www/apps/cloud/app/loyalty-plugin/page.mdx @@ -36,7 +36,7 @@ The Loyalty Plugin provides the following features: The Loyalty Plugin is currently only available for Cloud users. If you're not a Cloud user, [learn how to get started](../page.mdx#sign-up-for-cloud). -Then, you can [contact support](../support/page.mdx) for assistance in installing the Loyalty Plugin in your deployed Medusa application. +Then, you can contact support for assistance in installing the Loyalty Plugin in your deployed Medusa application. ### Loyalty Plugin API Routes diff --git a/www/apps/cloud/app/notifications/page.mdx b/www/apps/cloud/app/notifications/page.mdx index 35813e7cbc..4a477d8e03 100644 --- a/www/apps/cloud/app/notifications/page.mdx +++ b/www/apps/cloud/app/notifications/page.mdx @@ -11,7 +11,7 @@ In this guide, you'll learn about the notifications you receive in Cloud and how ## Notifications Overview -Cloud shows you notifications related to your organization, projects, environments, and deployments. These notifications keep you updated without needing to manually check for changes. +Medusa shows you notifications related to your organization, projects, environments, and deployments. These notifications keep you updated without needing to manually check for changes. ### Notification Types @@ -48,6 +48,6 @@ Actionable notifications will have a link that you can click to go to the releva ### Toast Notifications -Cloud also shows you toast notifications at the top right of the dashboard when you receive a new notification. These notifications appear momentarily and then disappear. They're helpful to quickly inform you about important updates. +Medusa also shows you toast notifications at the top right of the dashboard when you receive a new notification. These notifications appear momentarily and then disappear. They're helpful to quickly inform you about important updates. ![Toast notification showing a new notification](https://res.cloudinary.com/dza7lstvk/image/upload/v1750161675/Cloud/CleanShot_2025-06-17_at_14.56.06_2x_fsu5ny.png) \ No newline at end of file diff --git a/www/apps/cloud/app/organizations/page.mdx b/www/apps/cloud/app/organizations/page.mdx index 895b6fb2f1..fc6b865227 100644 --- a/www/apps/cloud/app/organizations/page.mdx +++ b/www/apps/cloud/app/organizations/page.mdx @@ -119,7 +119,7 @@ In this window, you can view the members of the organization, their roles, and t Based on your organization's plan, you may have a limited number of seats available for members. You can view the number of available seats at the top of the Team tab. -If you need more seats, you can contact our [sales team](https://medusajs.com/contact/) to add more seats to your organization or upgrade your plan. +If you need more seats, learn more about [other available plans](https://medusajs.com/pricing). ![Window showing the organization members in the Team tab with the available seats highlighted](https://res.cloudinary.com/dza7lstvk/image/upload/v1749737803/Cloud/CleanShot_2025-06-12_at_17.16.13_2x_zk8n32.png) diff --git a/www/apps/cloud/app/page.mdx b/www/apps/cloud/app/page.mdx index 3b1a547793..4fe80be0f2 100644 --- a/www/apps/cloud/app/page.mdx +++ b/www/apps/cloud/app/page.mdx @@ -4,68 +4,26 @@ export const metadata = { # Cloud Documentation -Welcome to the Cloud documentation. Learn about Cloud, its features, how to sign up, and how to use it. +Medusa allows teams to build and deploy reliable applications fast without worrying about infrastructure. -## What is Cloud? +Cloud is designed to bridge the gap between development and production, offering features like direct deployments from GitHub, instant preview environments, and more. -Cloud is Medusa's Platform-as-a-Service (PaaS) offering that facilitates deploying and operating your Medusa projects. You don't need to worry about configuring, scaling, and maintaining your application's infrastructure and resources. +In this guide, you'll learn about Cloud and its features. -By using Cloud, you only need to focus on building a commerce application that meets your business requirements. Cloud provides a seamless developer experience with features like direct deployments from GitHub, instant preview environments, and more. +## Sign Up for Cloud + +Go to [medusajs.com/start](https://medusajs.com/start) and sign up to get started. --- ## Features - **Direct deployments from GitHub**: Deploy your Medusa projects directly from your GitHub repository, and trigger deployments automatically on every push to the main branch. -- **Multiple Environments**: Create multiple environments for your projects, such as staging and production, to test changes before deploying them to production. -- **Instant Preview Environments**: Every time you open a Pull Request (PR) in your GitHub repository, a new preview environment is created where you can review changes before merging them. -- **Fully Managed Resources**: Cloud manages your project's resources like PostgreSQL, Redis, S3, and more. You don't have to worry about configuring and maintaining them. -- **Zero Downtime Deployments and Scalability**: Cloud rolls out changes to production with zero downtime, never interrupting your users. Cloud also automatically scales your project to meet peak traffic demands. -- **Logging**: Monitor your project's runtime and build logs for all environments, so you can easily debug issues in your project. -- **Dedicated Support**: Based on your plan, you can receive dedicated support from the Medusa team to help you with any issues you may encounter. - ---- - -## Sign Up for Cloud - -To sign up for Cloud, get in touch with [our sales team](https://medusajs.com/contact/). - -After chatting with our team and choosing a plan, you'll receive instructions on how to sign up for Cloud. You can then start deploying your Medusa projects. - ---- - -## Frequently Asked Questions - -### Do I need to learn about Medusa to use Cloud? - -Since you deploy Medusa projects on Cloud, you need a developer who is familiar with Medusa to set up your project and add customizations for your business needs. Learn about Medusa in the [Getting Started](!docs!/learn) guide. - -You can also contact a [Medusa Expert](https://medusajs.com/experts/) to help you with building your Medusa project and deploying it on Cloud. - -### Does Cloud support hosting storefronts? - -Cloud can only host Medusa servers and admin dashboards. To host your storefront, you can use hosting providers like Vercel. - -Learn more in the [Connect Production Storefront](./connect-storefront/page.mdx) guide. - -### What resources does Cloud provide? - -Cloud fully-manages your [PostgreSQL databases](./database/page.mdx), [Redis instances](./redis/page.mdx), and [S3 buckets](./s3/page.mdx). You don't need to configure or maintain them. - -### Do I own my code and data for my Medusa project on Cloud? - -Yes, your code is hosted on your GitHub repository. You can also export a dump of your Cloud database at any time. - -### Can I deploy multiple projects on Cloud? - -Yes, if your plan supports multiple projects. Contact our [sales team](https://medusajs.com/contact/) to learn more about the available plans. - -### Can I use my custom plugins and modules on Cloud? - -Yes, you can use any custom and out-of-the-box plugins and modules in your Medusa project deployed on Cloud. You retain the same flexibility as you would with a self-hosted Medusa project. - -You can deploy projects like marketplaces, B2B, subscription-based stores, and more on Cloud. - -### Does Cloud create new Medusa projects for each deployment? - -No, Cloud does not create new Medusa projects for your deployments. Instead, it deploys your existing Medusa project from your GitHub repository. \ No newline at end of file +- **Multiple Environments**: Create multiple long-lived environments for your projects, such as production and staging, to test changes before going live. +- **Instant Preview Environments**: Isolated preview environments are created on every pull request in your repository. +- **Managed Resources**: Medusa manages your project's resources, including a Postgres database, a Redis server, and an S3 bucket +- **Zero Downtime Deployments**: Medusa rolls out changes to production with zero downtime, never interrupting your users. +- **Autoscaling**: Environments scale to meet traffic demands. +- **Logging**: Monitor your project's runtime and build logs, so you can easily debug issues in your project. +- **Early Access**: Access new features before they are open-sourced, for example, Gift Cards and Draft Orders. +- **Dedicated Support**: Receive dedicated support from the Medusa team to help you with any issues you may encounter. diff --git a/www/apps/cloud/app/projects/page.mdx b/www/apps/cloud/app/projects/page.mdx index fef07c97e2..da0f70661a 100644 --- a/www/apps/cloud/app/projects/page.mdx +++ b/www/apps/cloud/app/projects/page.mdx @@ -12,7 +12,7 @@ In this guide, you'll learn about projects, how to create them, view their detai A project is the collection of resources, environments, deployments, and settings related to a Medusa application deployed to the Cloud. The project is linked to a GitHub repository that hosts the Medusa application's code. -To deploy a Medusa application to the Cloud, you create a project for it. Cloud will automatically set up and configure the necessary resources in the project to run the application, such as PostgreSQL, Redis, and S3. +To deploy a Medusa application to the Cloud, you create a project for it. Medusa will automatically set up and configure the necessary resources in the project to run the application, such as PostgreSQL, Redis, and S3. Each project can have multiple environments, such as production and staging. These environments allow you to test changes before pushing them live to users. You can learn more in the [Environments documentation](../environments/page.mdx). @@ -29,11 +29,11 @@ Before creating a project, ensure you have: - A Medusa application whose codebase is hosted in a GitHub repository. - If you don't have a Medusa application yet, refer to the [Installation](!docs!/learn/installation) guide to set up a new Medusa application. - A Cloud account with a valid plan that allows creating more projects. - - If you've exceeded the number of projects limit for your plan, you can [contact support](../support/page.mdx) to upgrade your plan. + - If you've exceeded the number of projects limit for your plan, you can contact support to upgrade your plan. #### Medusa Application Configurations -Your Medusa application doesn't need specific configurations to be deployed to Cloud. Cloud will automatically: +Your Medusa application doesn't need specific configurations to be deployed to Cloud. Medusa will automatically: - Create the necessary [server and worker instances](!docs!/learn/production/worker-mode). - Scale your Medusa application's resources based on the traffic it receives. @@ -57,7 +57,7 @@ To create a project: 3. If you haven't authenticated with GitHub yet, you'll be asked to authenticate first. 4. Once you're authenticated, you'll need to select a GitHub account and the repository that contains your Medusa application's code. The repository can be public or private. - - If you don't see your repository, you can click the "Configure repositories" link to manage the GitHub repositories that Cloud can access. + - If you don't see your repository, you can click the "Configure repositories" link to manage the GitHub repositories that Medusa can access. 5. Once you find the repository, select it and click the "Next" button. ![The select repository step in the project creation flow with a repository selected](https://res.cloudinary.com/dza7lstvk/image/upload/v1749741442/Cloud/CleanShot_2025-06-12_at_18.17.08_2x_ev7bum.png) @@ -70,7 +70,7 @@ To create a project: 7. You can optionally change the "Build and project" settings by expanding its section: - Select a region to deploy the project. For better performance, choose a region that's closer to your target users. The region can't be changed later. - - If you don't find the region you need, you can [contact support](../support/page.mdx) to request it. + - If you don't find the region you need, you can contact support to request it. - If your project is in a monorepo, you can specify the path to the Medusa project in the repository. Otherwise, leave it empty. - You can change the email and password for the admin user created for the project. These are the credentials you'll use to access the Medusa Admin. @@ -107,7 +107,7 @@ Once the project is created and deployed, you'll receive a notification in the C If you encounter any issues while creating a project: - [Check the build and runtime logs of the project's production deployment](../logs/page.mdx). -- [Contact support for help](../support/page.mdx). +- Contact support for help. ### Subdomain Restrictions @@ -197,7 +197,7 @@ To edit a project's general details: You can also edit the "Previews" settings of a project from the "Settings" tab, which are general settings related to Previews environments. -Learn more in the [Environments](../environments/page.mdx) guide. +Learn more in the [Preview Environments](../environments/preview/page.mdx) guide. --- diff --git a/www/apps/cloud/app/redis/page.mdx b/www/apps/cloud/app/redis/page.mdx index a2cf8732a0..ccdf98b1d8 100644 --- a/www/apps/cloud/app/redis/page.mdx +++ b/www/apps/cloud/app/redis/page.mdx @@ -4,13 +4,13 @@ export const metadata = { # {metadata.title} -In this guide, you'll learn about the managed Redis service that Cloud provides as part of your project environments. +In this guide, you'll learn about the managed Redis service that Medusa provides as part of your project environments. ## Managed Redis Service -Cloud offers a managed Redis service for your project environments. Each environment has its own dedicated Redis instance that is automatically provisioned when the environment is created. +Medusa provisions and manages Redis servers for each of your environments. -So, when you create a new project, Cloud creates a production Redis instance for the production environment. If you create a staging environment, Cloud creates a separate Redis instance for that environment as well. +Each project environment has a dedicated Redis server. These Redis servers are entirely isolated from one another, similar to the Postgres databases. ![Diagram showcasing Redis isolation between environments](https://res.cloudinary.com/dza7lstvk/image/upload/v1750230910/Cloud/redis-cloud_llg83c.jpg) @@ -18,7 +18,7 @@ So, when you create a new project, Cloud creates a production Redis instance for ## Configured Redis Infrastructure Modules -Cloud automatically configures your Medusa application to use Redis-based Infrastructure Modules, including: +Medusa automatically configures your Medusa application to use Redis-based Infrastructure Modules, including: - [Redis Event Module](!resources!/infrastructure-modules/event/redis) - [Redis Cache Module](!resources!/infrastructure-modules/cache/redis) @@ -29,13 +29,13 @@ So, you don't need to configure any of these modules and providers or set up Red -If you're using a Medusa version before v2.7.0, [contact support](../support/page.mdx) for assistance in configuring the Redis modules. +If you're using a Medusa version before v2.7.0, contact support for assistance in configuring the Redis modules. ### Access Redis Configurations -Since Cloud is a managed service, you can't directly access your Redis instance or its configurations. Cloud also doesn't expose the Redis instance connection or configuration details. +Since Cloud is a managed service, you can't directly access your Redis instance or its configurations. Medusa also doesn't expose the Redis instance connection or configuration details. ### Override Redis Configurations @@ -45,6 +45,6 @@ Then, configure the modules and providers you're overriding in your `medusa-conf -To set the connection URL of your external Redis instance, refer to the [Environments](../environments/page.mdx#add-environment-variables) guide to learn how to add environment variables. You can then use these variables in your `medusa-config.ts` file to connect to your Redis instance. +To set the connection URL of your external Redis instance, refer to the [Manage Environment Variables](../environments/environment-variables/page.mdx) guide to learn how to add environment variables. You can then use these variables in your `medusa-config.ts` file to connect to your Redis instance. \ No newline at end of file diff --git a/www/apps/cloud/app/s3/page.mdx b/www/apps/cloud/app/s3/page.mdx index 737f5ebb39..0c79584cc2 100644 --- a/www/apps/cloud/app/s3/page.mdx +++ b/www/apps/cloud/app/s3/page.mdx @@ -4,13 +4,13 @@ export const metadata = { # {metadata.title} -In this guide, you'll learn about the managed S3 storage service that Cloud provides as part of your project environments. +In this guide, you'll learn about the managed S3 storage service that Medusa provides as part of your project environments. ## Managed S3 Storage Service -Cloud offers a managed S3 storage service for your project environments. Each environment has its own dedicated S3 bucket that is automatically provisioned when the environment is created. +Medusa offers a managed S3 storage service for your project environments. Each environment has its own dedicated S3 bucket that is automatically provisioned when the environment is created. -So, when you create a new project, Cloud creates a production S3 bucket for the production environment. If you create a staging environment, Cloud creates a separate S3 bucket for that environment as well. +So, when you create a new project, Medusa creates a production S3 bucket for the production environment. If you create a staging environment, Medusa creates a separate S3 bucket for that environment as well. By default, the S3 bucket is private, but the files you upload to the bucket are publicly accessible. This is necessary for serving product images and other assets in your Medusa application. @@ -20,19 +20,19 @@ By default, the S3 bucket is private, but the files you upload to the bucket are ## Configured S3 File Module Provider -Cloud automatically configures your Medusa application to use the [S3 File Module Provider](!resources!/infrastructure-modules/file/s3). +Medusa automatically configures your Medusa application to use the [S3 File Module Provider](!resources!/infrastructure-modules/file/s3). So, you don't need to configure the S3 File Module Provider or set up S3 manually. Also, if you have the S3 File Module Provider configured in `medusa-config.ts`, remove it to avoid conflicts. -If you're using a Medusa version before v2.7.0, [contact support](../support/page.mdx) for assistance in configuring the S3 File Module Provider. +If you're using a Medusa version before v2.7.0, contact support for assistance in configuring the S3 File Module Provider. ### Access S3 Configurations -Since Cloud is a managed service, you can't directly access your S3 bucket or its configurations. Cloud also doesn't expose the S3 bucket connection or configuration details. +Since Cloud is a managed service, you can't directly access your S3 bucket or its configurations. Medusa also doesn't expose the S3 bucket connection or configuration details. ### Override S3 Configurations @@ -42,6 +42,6 @@ Then, configure the S3 File Module Provider in your `medusa-config.ts` file to c -To set the connection options of your external S3 instance, refer to the [Environments](../environments/page.mdx#add-environment-variables) guide to learn how to add environment variables. You can then use these variables in your `medusa-config.ts` file to connect to your S3 instance. +To set the connection options of your external S3 instance, refer to the [Environments](../environments/environment-variables/page.mdx#add-environment-variables) guide to learn how to add environment variables. You can then use these variables in your `medusa-config.ts` file to connect to your S3 instance. \ No newline at end of file diff --git a/www/apps/cloud/app/support/page.mdx b/www/apps/cloud/app/support/page.mdx deleted file mode 100644 index 0b377ebb2d..0000000000 --- a/www/apps/cloud/app/support/page.mdx +++ /dev/null @@ -1,59 +0,0 @@ -import { InlineIcon } from "docs-ui" -import { QuestionMarkCircle } from "@medusajs/icons" - -export const metadata = { - title: `Support`, -} - -# {metadata.title} - -In this guide, you'll learn how to receive support as a Cloud user. - -## Cloud Support - -Based on your Cloud plan, you can receive support from our team and get access to a solutions engineer. - -Our support offering helps you troubleshoot issues, get help with setup, and get guidance on building custom features. Our support team is here to assist you from development to production. - -There are two main ways to contact support: through the Cloud dashboard or through Slack. - ---- - -## Contact Support via Cloud - -You can find a icon at the top right of the Cloud dashboard. Click on it to open the support form. - -In the support form, you can provide a subject and a description of your issue. You can also attach files to help our team understand the problem better. - -Use this form to report bugs in Cloud, request help with using the Cloud dashboard, or ask for general assistance. - - - -For reporting bugs in the Medusa core application, open an issue on the [GitHub repository](https://github.com/medusajs/medusa/issues/new/choose). - - - -Make sure to provide as many details as possible about your issue to receive the best assistance. - -![Contact support form in the Cloud dashboard](https://res.cloudinary.com/dza7lstvk/image/upload/v1750328821/Cloud/CleanShot_2025-06-19_at_13.26.49_2x_f0osmk.png) - ---- - -## Contact Support via Slack - -If your plan includes Slack support, our team will set up a dedicated support channel for you. - -You can reach out on this channel to receive help from our team. You can: - -- Ask questions about using Cloud. -- Report issues with the Cloud dashboard. -- Get assistance with operations that require actions from our team. -- Receive guidance on building custom features. - -Make sure to provide as many details as possible about your issue to receive the best assistance. Also, please follow the guidelines shared in the channel to ensure a smooth support experience. - ---- - -## Other Support Options - -If you prefer other forms of communication, you can [contact sales](https://medusajs.com/contact/) to discuss additional support options. Our team can help you find the best solution for your needs. \ No newline at end of file diff --git a/www/apps/cloud/app/update-medusa/page.mdx b/www/apps/cloud/app/update-medusa/page.mdx index 732567a284..f2ecef9254 100644 --- a/www/apps/cloud/app/update-medusa/page.mdx +++ b/www/apps/cloud/app/update-medusa/page.mdx @@ -30,7 +30,7 @@ It's **strongly discouraged** to push a new update directly to your production b By using a separate environment, you mitigate any unexpected issues that may arise during the update process. This way, you ensure that your customizations and configurations work correctly with the new version of Medusa. -The **recommended** approach is to [create a long-lived environment](../environments/page.mdx#create-a-long-lived-environment), such as Staging. You can push the new update and test it thoroughly in a production-like environment before deploying it to production. +The **recommended** approach is to [create a long-lived environment](../environments/long-lived/page.mdx#create-a-long-lived-environment), such as Staging. You can push the new update and test it thoroughly in a production-like environment before deploying it to production. @@ -40,7 +40,7 @@ Each environment has its own database, so you can safely update other environmen ![Diagram showcasing process of deploying to staging then production](https://res.cloudinary.com/dza7lstvk/image/upload/v1750334010/Cloud/deploy-to-staging_d4oyys.jpg) -Alternatively, you can open a pull request to the production branch, which will [create a preview environment](../environments/page.mdx#preview-environments). The preview environment allows you to test the update before merging it into the production branch. +Alternatively, you can open a pull request to the production branch, which will [create a preview environment](../environments/preview/page.mdx#preview-environments). The preview environment allows you to test the update before merging it into the production branch. ![Diagram showcasing process of deploying to preview then production](https://res.cloudinary.com/dza7lstvk/image/upload/v1750334010/Cloud/deploy-to-preview_plpz9z.jpg) @@ -59,7 +59,7 @@ To update your Medusa application deployed on Cloud: 1. Update your Medusa application locally either on the long-lived environment's branch (for example, Staging) or in a new branch that will be used to create a pull request. - To learn how to update your Medusa application, refer to the [Update guide](!docs!/learn/update). It includes all the details you need to update the Medusa application locally. 2. Once you're done updating your application locally, push the changes in `package.json`, lock file (for example, `yarn.lock`), and any other affected files to the branch. - - If you're using a long-lived environment, Cloud will automatically deploy the changes to the branch's environment. + - If you're using a long-lived environment, Medusa will automatically deploy the changes to the branch's environment. - If you're using a new branch to create a pull request, open the pull request to the production branch. This will create a preview environment that you can use to test the update before merging it into the production branch. Then, you can access the environment's [live deployment](../deployments/page.mdx#access-live-deployment) to test the update. You can also use the [build](../logs/page.mdx#view-build-logs) and [runtime](../logs/page.mdx#view-runtime-logs) logs of the environment to debug any issues that occur during the update process or testing. @@ -68,7 +68,7 @@ Then, you can access the environment's [live deployment](../deployments/page.mdx Once you've thoroughly tested the update in your long-lived or preview environment, you can merge the changes into your production branch. -Cloud will automatically deploy the changes to the production environment. This will update the production's code and database. +Medusa will automatically deploy the changes to the production environment. This will update the production's code and database. --- @@ -76,4 +76,4 @@ Cloud will automatically deploy the changes to the production environment. This If you encounter any issues after updating your deployed Medusa application, you can [redeploy a previous deployment](../deployments/page.mdx#redeploy-a-deployment) to roll back the code changes made by the update. -However, redeploying a previous deployment will not roll back the database changes made by the update. If you need to roll back the database changes, [contact support](../support/page.mdx) for assistance. +However, redeploying a previous deployment will not roll back the database changes made by the update. If you need to roll back the database changes, contact support for assistance. diff --git a/www/apps/cloud/generated/edit-dates.mjs b/www/apps/cloud/generated/edit-dates.mjs index 2cedf6bbdf..6b4fff2cf6 100644 --- a/www/apps/cloud/generated/edit-dates.mjs +++ b/www/apps/cloud/generated/edit-dates.mjs @@ -1,20 +1,22 @@ export const generatedEditDates = { - "app/page.mdx": "2025-06-20T07:56:00.893Z", + "app/page.mdx": "2025-06-25T08:00:52.728Z", "app/organization/page.mdx": "2025-06-12T14:43:20.772Z", - "app/projects/page.mdx": "2025-06-24T11:17:17.668Z", - "app/environments/page.mdx": "2025-06-24T11:18:00.011Z", - "app/deployments/page.mdx": "2025-06-19T14:14:31.740Z", - "app/organizations/page.mdx": "2025-06-19T14:15:13.990Z", - "app/notifications/page.mdx": "2025-06-17T12:29:18.819Z", - "app/database/page.mdx": "2025-06-19T14:13:32.800Z", - "app/redis/page.mdx": "2025-06-19T14:16:06.488Z", - "app/s3/page.mdx": "2025-06-19T14:16:11.227Z", - "app/draft-order-plugin/page.mdx": "2025-06-19T14:14:49.500Z", - "app/loyalty-plugin/page.mdx": "2025-06-24T13:00:52.953Z", - "app/billing-usage/page.mdx": "2025-06-19T14:13:29.533Z", + "app/projects/page.mdx": "2025-06-25T07:57:21.261Z", + "app/environments/page.mdx": "2025-06-25T08:00:05.550Z", + "app/deployments/page.mdx": "2025-06-25T07:57:13.059Z", + "app/organizations/page.mdx": "2025-06-25T07:13:02.263Z", + "app/notifications/page.mdx": "2025-06-25T07:27:37.642Z", + "app/database/page.mdx": "2025-06-25T07:54:40.231Z", + "app/redis/page.mdx": "2025-06-25T07:57:23.246Z", + "app/s3/page.mdx": "2025-06-25T07:57:24.832Z", + "app/draft-order-plugin/page.mdx": "2025-06-25T07:57:14.898Z", + "app/loyalty-plugin/page.mdx": "2025-06-25T07:57:16.691Z", + "app/billing-usage/page.mdx": "2025-06-25T07:57:03.206Z", "app/logs/page.mdx": "2025-06-19T07:44:38.336Z", - "app/support/page.mdx": "2025-06-19T11:18:37.253Z", - "app/update-medusa/page.mdx": "2025-06-19T11:18:42.545Z", - "app/connect-storefront/page.mdx": "2025-06-19T14:13:06.812Z", - "app/infrastructure/page.mdx": "2025-06-20T07:16:54.699Z" + "app/update-medusa/page.mdx": "2025-06-25T07:57:30.170Z", + "app/connect-storefront/page.mdx": "2025-06-25T07:47:00.499Z", + "app/environments/environment-variables/page.mdx": "2025-06-25T07:42:53.521Z", + "app/environments/long-lived/page.mdx": "2025-06-25T07:55:24.283Z", + "app/environments/preview/page.mdx": "2025-06-25T08:00:00.839Z", + "app/faq/page.mdx": "2025-06-25T08:00:26.853Z" } \ No newline at end of file diff --git a/www/apps/cloud/generated/sidebar.mjs b/www/apps/cloud/generated/sidebar.mjs index daa852243d..65929bb44e 100644 --- a/www/apps/cloud/generated/sidebar.mjs +++ b/www/apps/cloud/generated/sidebar.mjs @@ -6,10 +6,27 @@ export const generatedSidebars = [ { "loaded": true, "isPathHref": true, - "type": "link", - "path": "/", - "title": "Introduction", - "children": [] + "type": "category", + "title": "Getting Started", + "initialOpen": true, + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/", + "title": "Introduction", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/faq", + "title": "FAQ", + "children": [] + } + ] }, { "type": "separator" @@ -43,7 +60,32 @@ export const generatedSidebars = [ "type": "link", "title": "Environments", "path": "/environments", - "children": [] + "children": [ + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Long-Lived", + "path": "/environments/long-lived", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Preview", + "path": "/environments/preview", + "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "title": "Environment Variables", + "path": "/environments/environment-variables", + "children": [] + } + ] }, { "loaded": true, @@ -62,14 +104,6 @@ export const generatedSidebars = [ "title": "Resources", "initialOpen": true, "children": [ - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Infrastructure", - "path": "/infrastructure", - "children": [] - }, { "loaded": true, "isPathHref": true, @@ -160,14 +194,6 @@ export const generatedSidebars = [ "title": "Notifications", "path": "/notifications", "children": [] - }, - { - "loaded": true, - "isPathHref": true, - "type": "link", - "title": "Support", - "path": "/support", - "children": [] } ] }, diff --git a/www/apps/cloud/next.config.mjs b/www/apps/cloud/next.config.mjs index 3755d9281b..a737c442c9 100644 --- a/www/apps/cloud/next.config.mjs +++ b/www/apps/cloud/next.config.mjs @@ -130,6 +130,18 @@ const nextConfig = { experimental: { optimizePackageImports: ["@medusajs/icons", "@medusajs/ui"], }, + redirects: async () => [ + { + source: "/infrastructure", + destination: "/environments", + permanent: true, + }, + { + source: "/support", + destination: "/faq", + permanent: true, + }, + ], } const withBundleAnalyzer = bundleAnalyzer({ diff --git a/www/apps/cloud/sidebar.mjs b/www/apps/cloud/sidebar.mjs index 67d81fd591..a65a87986d 100644 --- a/www/apps/cloud/sidebar.mjs +++ b/www/apps/cloud/sidebar.mjs @@ -5,9 +5,21 @@ export const sidebar = [ title: "Cloud", items: [ { - type: "link", - path: "/", - title: "Introduction", + type: "category", + title: "Getting Started", + initialOpen: true, + children: [ + { + type: "link", + path: "/", + title: "Introduction", + }, + { + type: "link", + path: "/faq", + title: "FAQ", + }, + ], }, { type: "separator", @@ -31,6 +43,23 @@ export const sidebar = [ type: "link", title: "Environments", path: "/environments", + children: [ + { + type: "link", + title: "Long-Lived", + path: "/environments/long-lived", + }, + { + type: "link", + title: "Preview", + path: "/environments/preview", + }, + { + type: "link", + title: "Environment Variables", + path: "/environments/environment-variables", + }, + ], }, { type: "link", @@ -44,11 +73,6 @@ export const sidebar = [ title: "Resources", initialOpen: true, children: [ - { - type: "link", - title: "Infrastructure", - path: "/infrastructure", - }, { type: "link", title: "Database", @@ -110,11 +134,6 @@ export const sidebar = [ title: "Notifications", path: "/notifications", }, - { - type: "link", - title: "Support", - path: "/support", - }, ], }, {