fix: commands to run from within the .medusa/server directory (#9941)
This commit is contained in:
@@ -47,7 +47,7 @@ So, add the following configuration in `medusa-config.ts`:
|
|||||||
module.exports = defineConfig({
|
module.exports = defineConfig({
|
||||||
projectConfig: {
|
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
|
AUTH_CORS= # STOREFRONT AND ADMIN URLS, SEPARATED BY COMMAS
|
||||||
# change to false if you're hosting the admin with the application
|
# change to false if you're hosting the admin with the application
|
||||||
DISABLE_MEDUSA_ADMIN=true
|
DISABLE_MEDUSA_ADMIN=true
|
||||||
MEDUSA_WORKER_MODE=worker
|
MEDUSA_WORKER_MODE=server
|
||||||
PORT=9000
|
PORT=9000
|
||||||
DATABASE_URL=${{Postgres.DATABASE_PUBLIC_URL}}
|
DATABASE_URL=${{Postgres.DATABASE_PUBLIC_URL}}
|
||||||
REDIS_URL=${{Redis.REDIS_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:
|
4. For the “Custom Start Command” field, enter the following and click the check mark button:
|
||||||
|
|
||||||
```bash npm2yarn
|
```bash npm2yarn
|
||||||
npm run predeploy && npm run start
|
cd .medusa/server && npm run predeploy && npm run start
|
||||||
```
|
```
|
||||||
|
|
||||||
### Deploy Changes
|
### Deploy Changes
|
||||||
@@ -286,7 +286,7 @@ In Railway, add / modify the following environment variables for the Medusa appl
|
|||||||
```bash
|
```bash
|
||||||
ADMIN_CORS= # MEDUSA APPLICATION URL
|
ADMIN_CORS= # MEDUSA APPLICATION URL
|
||||||
AUTH_CORS= # ADD 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`.
|
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:
|
4. For the “Custom Start Command” field, enter the following and click the check mark button:
|
||||||
|
|
||||||
```bash npm2yarn
|
```bash npm2yarn
|
||||||
npm run start
|
cd .medusa/server && npm run start
|
||||||
```
|
```
|
||||||
|
|
||||||
### Deploy Changes
|
### Deploy Changes
|
||||||
|
|||||||
Reference in New Issue
Block a user