docs: Update Redis connection string instructions for Railway (#10246)

* Update Railway's Redis and Database URL connection string instructions

- Clarified instructions for enabling IPv6 by adding the ?family=0 suffix due to lack of IPv4 private networking support

* Update www/apps/resources/app/deployment/medusa-application/railway/page.mdx

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>

* add similar explanation in worker mode

* whitespace

---------

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
This commit is contained in:
Jesus EscalonaandShahed Nasser authored and GitHub committed 2024-11-26 18:43:15 +02:00
1 parent b871b10b18
commit a7a7541b9b
1 file changed
+6 -4
@@ -229,8 +229,8 @@ AUTH_CORS= # STOREFRONT AND ADMIN URLS, SEPARATED BY COMMAS
DISABLE_MEDUSA_ADMIN=true
MEDUSA_WORKER_MODE=server
PORT=9000
DATABASE_URL=${{Postgres.DATABASE_PUBLIC_URL}}
REDIS_URL=${{Redis.REDIS_PUBLIC_URL}}
DATABASE_URL=${{Postgres.RAILWAY_PRIVATE_DOMAIN}}
REDIS_URL=${{Redis.REDIS_URL}}?family=0
```
Where:
@@ -240,6 +240,7 @@ Where:
- `ADMIN_CORS`'s value is the URL of the admin dashboard. If you don’t have it yet, or you’re deploying the admin with the Medusa application, you can skip adding it for now.
- `AUTH_CORS`'s value is the URLs of any application authenticating users, customers, or other actor types, such as the storefront and admin URLs. The URLs are separated by commas. If you don’t have the URLs yet, you can set its value later.
- Change `DISABLE_MEDUSA_ADMIN` to `false` if you’re hosting the admin with the Medusa application.
- `REDIS_URL`'s value is automatically generated using Railway’s template syntax. You add the `?family=0` to the connection string to support both IPv6 and IPv4 connections.
Feel free to add any other relevant environment variables. Once you’re done, click the Update Variables button.
@@ -337,14 +338,15 @@ JWT_SECRET=supersecret # TODO GENERATE SECURE SECRET
DISABLE_MEDUSA_ADMIN=true
MEDUSA_WORKER_MODE=worker
PORT=9000
DATABASE_URL=${{Postgres.DATABASE_PUBLIC_URL}}
REDIS_URL=${{Redis.REDIS_PUBLIC_URL}}
DATABASE_URL=${{Postgres.RAILWAY_PRIVATE_DOMAIN}}
REDIS_URL=${{Redis.REDIS_URL}}?family=0
```
Where:
- The value of `COOKIE_SECRET` and `JWT_SECRET` must be a randomly generated secret.
- Keep `DISABLE_MEDUSA_ADMIN`'s value set to `true`, even if you’re hosting the admin with the Medusa application.
- `REDIS_URL`'s value is automatically generated using Railway’s template syntax. You add the `?family=0` to the connection string to support both IPv6 and IPv4 connections.
Feel free to add any other relevant environment variables. Once you’re done, click the Update Variables button.