You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: www/apps/book/app/learn/deployment/general/page.mdx
+6-8
Original file line number
Diff line number
Diff line change
@@ -218,16 +218,16 @@ Feel free to add any other relevant environment variables, such as for integrati
218
218
219
219
### Set Start Command
220
220
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.
224
222
225
223
If your hosting provider doesn't support setting a current-working directory, set the start command to the following:
226
224
227
225
```bash npm2yarn
228
-
cd .medusa/server && npm run predeploy && npm run start
226
+
cd .medusa/server && npm install && npm run predeploy && npm run start
229
227
```
230
228
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
+
231
231
### Set Backend URL in Admin Configuration
232
232
233
233
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
293
293
294
294
### Set Start Command
295
295
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.
299
297
300
298
If your hosting provider doesn't support setting a current-working directory, set the start command to the following:
301
299
302
300
```bash npm2yarn
303
-
cd .medusa/server && npm run predeploy&& npm run start
301
+
cd .medusa/server && npm run install&& npm run start
0 commit comments