Skip to content

Commit

Permalink
docs: update environment variable used in admin's deploy guides (#2748)
Browse files Browse the repository at this point in the history
* docs: Update netlify deploy readme for clarity

It was unlcear why "Gatsby" was mentioned in the env name for the server URL. Also, the code shows precedence given to `MEDUSA_BACKEND_URL` now:

```
    __MEDUSA_BACKEND_URL__: JSON.stringify(
      env.MEDUSA_BACKEND_URL ||
        // Backwards-compat with Gatsby.
        env.GATSBY_MEDUSA_BACKEND_URL ||
        env.GATSBY_STORE_URL ||
        ""
    ),
```

Therefore, this should be indicated in the documentation.

* Update docs/content/deployments/admin/deploying-on-netlify.md

* Update deploying-on-netlify.md

Co-authored-by: Shahed Nasser <[email protected]>
  • Loading branch information
komali2 and shahednasser authored Dec 13, 2022
1 parent 9021037 commit 6b51dd0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/content/deployments/admin/deploying-on-netlify.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,17 @@ If you haven’t deployed your Medusa server yet, you can leave the value blank
Run the following command to add the environment variable:

```bash
netlify env:set GATSBY_MEDUSA_BACKEND_URL "<YOUR_SERVER_URL>"
netlify env:set MEDUSA_BACKEND_URL "<YOUR_SERVER_URL>"
```

Where `<YOUR_SERVER_URL>` is the URL of your Medusa server.

:::note

In previous versions of the admin, the environment variable name was `GATSBY_MEDUSA_BACKEND_URL` or `GATSBY_STORE_URL` instead. The admin remains backwards compatible, so if you've used this an older version you can keep the same environment variables. However, it's highly recommended you change it to `MEDUSA_BACKEND_URL`.

:::

#### Check deployment status

You can check the deployment status of your website by running the following command:
Expand Down

0 comments on commit 6b51dd0

Please sign in to comment.