From 1a0882cc015897e27d876877c95acf7db24a658b Mon Sep 17 00:00:00 2001 From: Harminder Virk Date: Thu, 7 Nov 2024 14:12:54 +0530 Subject: [PATCH] fix: commands to run from within the `.medusa/server` directory (#9941) --- .../app/deployment/medusa-application/railway/page.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/www/apps/resources/app/deployment/medusa-application/railway/page.mdx b/www/apps/resources/app/deployment/medusa-application/railway/page.mdx index fd2995ab6a3d7..d63b869717ac2 100644 --- a/www/apps/resources/app/deployment/medusa-application/railway/page.mdx +++ b/www/apps/resources/app/deployment/medusa-application/railway/page.mdx @@ -47,7 +47,7 @@ So, add the following configuration in `medusa-config.ts`: module.exports = defineConfig({ projectConfig: { // ... - workerMode: process.env.MEDUSA_WORKER_MODE, + workerMode: process.env.MEDUSA_WORKER_MODE as "shared" | "worker" | "server", }, }) ``` @@ -219,7 +219,7 @@ ADMIN_CORS= # ADMIN URL AUTH_CORS= # STOREFRONT AND ADMIN URLS, SEPARATED BY COMMAS # change to false if you're hosting the admin with the application DISABLE_MEDUSA_ADMIN=true -MEDUSA_WORKER_MODE=worker +MEDUSA_WORKER_MODE=server PORT=9000 DATABASE_URL=${{Postgres.DATABASE_PUBLIC_URL}} REDIS_URL=${{Redis.REDIS_PUBLIC_URL}} @@ -245,7 +245,7 @@ To set the `start` command of your Medusa application in server mode: 4. For the “Custom Start Command” field, enter the following and click the check mark button: ```bash npm2yarn -npm run predeploy && npm run start +cd .medusa/server && npm run predeploy && npm run start ``` ### Deploy Changes @@ -286,7 +286,7 @@ In Railway, add / modify the following environment variables for the Medusa appl ```bash ADMIN_CORS= # MEDUSA APPLICATION URL AUTH_CORS= # ADD MEDUSA APPLICATION URL -MEDUSA_BACKEND_URL= # MEDUSA APPLICATION URL +MEDUSA_BACKEND_URL=https://${{RAILWAY_PUBLIC_DOMAIN}} ``` Where you set the value of `ADMIN_CORS` and `MEDUSA_BACKEND_URL` to the Medusa application’s URL you got from the previous step, and you add the URL to `AUTH_CORS`. @@ -350,7 +350,7 @@ To set the `start` command of your Medusa application in worker mode: 4. For the “Custom Start Command” field, enter the following and click the check mark button: ```bash npm2yarn -npm run start +cd .medusa/server && npm run start ``` ### Deploy Changes