Skip to content

Commit a9e2ef6

Browse files
authored
docs: fix start command in deployment guides (medusajs#11571)
1 parent 5071001 commit a9e2ef6

File tree

5 files changed

+10625
-10629
lines changed

5 files changed

+10625
-10629
lines changed

www/apps/book/app/learn/deployment/general/page.mdx

+6-8
Original file line numberDiff line numberDiff line change
@@ -218,16 +218,16 @@ Feel free to add any other relevant environment variables, such as for integrati
218218

219219
### Set Start Command
220220

221-
The Medusa application's production build, which is created using the `build` command, outputs the Medusa application to `.medusa/server`.
222-
223-
So, you must run the `start` command from the `.medusa/server` directory.
221+
The Medusa application's production build, which is created using the `build` command, outputs the Medusa application to `.medusa/server`. So, you must install the dependencies in the `.medusa/server` directory, then run the `start` command in it.
224222

225223
If your hosting provider doesn't support setting a current-working directory, set the start command to the following:
226224

227225
```bash npm2yarn
228-
cd .medusa/server && npm run predeploy && npm run start
226+
cd .medusa/server && npm install && npm run predeploy && npm run start
229227
```
230228

229+
Notice that you run the `predeploy` command before starting the Medusa application to run migrations and sync links whenever there's an update.
230+
231231
### Set Backend URL in Admin Configuration
232232

233233
After you’ve obtained the Medusa application’s URL, add the following configuration to `medusa-config.ts`:
@@ -293,14 +293,12 @@ Feel free to add any other relevant environment variables, such as for integrati
293293

294294
### Set Start Command
295295

296-
The Medusa application's production build, which is created using the `build` command, outputs the Medusa application to `.medusa/server`.
297-
298-
So, you must run the `start` command from the `.medusa/server` directory.
296+
The Medusa application's production build, which is created using the `build` command, outputs the Medusa application to `.medusa/server`. So, you must install the dependencies in the `.medusa/server` directory, then run the `start` command in it.
299297

300298
If your hosting provider doesn't support setting a current-working directory, set the start command to the following:
301299

302300
```bash npm2yarn
303-
cd .medusa/server && npm run predeploy && npm run start
301+
cd .medusa/server && npm run install && npm run start
304302
```
305303

306304
---

www/apps/book/generated/edit-dates.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export const generatedEditDates = {
104104
"app/learn/fundamentals/custom-cli-scripts/seed-data/page.mdx": "2024-12-09T14:38:06.385Z",
105105
"app/learn/fundamentals/environment-variables/page.mdx": "2025-02-18T15:29:37.717Z",
106106
"app/learn/build/page.mdx": "2024-12-09T11:05:17.383Z",
107-
"app/learn/deployment/general/page.mdx": "2024-11-25T14:33:50.439Z",
107+
"app/learn/deployment/general/page.mdx": "2025-02-24T07:38:02.164Z",
108108
"app/learn/fundamentals/workflows/multiple-step-usage/page.mdx": "2024-11-25T16:19:32.169Z",
109109
"app/learn/installation/page.mdx": "2025-01-31T13:16:57.883Z",
110110
"app/learn/fundamentals/data-models/check-constraints/page.mdx": "2024-12-06T14:34:50.384Z",

0 commit comments

Comments
 (0)