From ffdec55cc6f82dc908586c7ba97a44ace38f62b3 Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Tue, 24 Jun 2025 14:53:18 +0300 Subject: [PATCH] docs: added list of restricted envs and subdomains (#12810) --- www/apps/cloud/app/environments/page.mdx | 27 ++++++++++++++++++++++++ www/apps/cloud/app/projects/page.mdx | 14 +++++++++++- www/apps/cloud/generated/edit-dates.mjs | 4 ++-- 3 files changed, 42 insertions(+), 3 deletions(-) diff --git a/www/apps/cloud/app/environments/page.mdx b/www/apps/cloud/app/environments/page.mdx index d40cbe5113..0bbe1ee13b 100644 --- a/www/apps/cloud/app/environments/page.mdx +++ b/www/apps/cloud/app/environments/page.mdx @@ -68,6 +68,7 @@ To create a long-lived environment: - 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) @@ -186,6 +187,32 @@ Learn more in the [Logs guide](../logs/page.mdx). 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: diff --git a/www/apps/cloud/app/projects/page.mdx b/www/apps/cloud/app/projects/page.mdx index 8d815d5b57..fef07c97e2 100644 --- a/www/apps/cloud/app/projects/page.mdx +++ b/www/apps/cloud/app/projects/page.mdx @@ -64,7 +64,7 @@ To create a project: 6. In the next step, configure the project's settings: - Enter the name of the project. - - Enter a custom subdomain for the project. All projects are subdomains of `medusajs.app`. For example, if you enter `my-project`, the project will be accessible at `my-project.medusajs.app`. + - Enter a custom subdomain for the project. All projects are subdomains of `medusajs.app`. For example, if you enter `my-project`, the project will be accessible at `my-project.medusajs.app`. Refer to the [subdomain restrictions](#subdomain-restrictions) section for more details. ![The project settings step in the project creation flow with the settings filled in](https://res.cloudinary.com/dza7lstvk/image/upload/v1749741990/Cloud/CleanShot_2025-06-12_at_18.26.15_2x_kyxggl.png) @@ -109,6 +109,18 @@ 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). +### Subdomain Restrictions + +When you choose a subdomain for your project, it must be at least five characters long. It also can't be one of the following reserved subdomains: + +- `medusa` +- `admin` +- `staging` +- `production` +- `preview` +- `development` +- `proxy`. + --- ## Access Deployed Project diff --git a/www/apps/cloud/generated/edit-dates.mjs b/www/apps/cloud/generated/edit-dates.mjs index 795535ce89..1bd11ebd91 100644 --- a/www/apps/cloud/generated/edit-dates.mjs +++ b/www/apps/cloud/generated/edit-dates.mjs @@ -1,8 +1,8 @@ export const generatedEditDates = { "app/page.mdx": "2025-06-20T07:56:00.893Z", "app/organization/page.mdx": "2025-06-12T14:43:20.772Z", - "app/projects/page.mdx": "2025-06-19T14:17:06.679Z", - "app/environments/page.mdx": "2025-06-19T14:15:00.389Z", + "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",