chore(framework): add a note for admin path configuration + add troubleshooting guide (#8905)

- add a note in the `path` configuration regarding same path as docker image
- Add a section in the troubleshooting guide for the same reason
This commit is contained in:
Shahed Nasser
2024-09-01 10:46:32 +03:00
committed by GitHub
parent 4ffb49efd0
commit 7e92aa412c
2 changed files with 24 additions and 0 deletions

View File

@@ -37,6 +37,13 @@ export type AdminOptions = {
* - `/auth`
* - `/`
*
* :::note
*
* When using Docker, make sure that the root path of the Docker image doesn't path the admin's `path`. For example, if the Docker image's root path is `/app`, change
* the value of the `path` configuration, as it's `/app` by default.
*
* :::
*
* @example
* ```js title="medusa-config.js"
* module.exports = defineConfig({

View File

@@ -35,3 +35,20 @@ export const config = defineWidgetConfig({
Any other usage leads to the widget not being shown.
Refer to the [Admin Development Constraints](!docs!/advanced-development/admin/constraints) documentation for more details.
---
## Errors in Docker
If you're using a Docker image to host your Medusa application, make sure that the image's root path is different than the Medusa Admin's `path` configuration.
For example, if your Docker image's root path is `/app`, make sure to change the `path` configuration in `medusa-config.js`, as it's `/app` by default:
```js title="medusa-config.js"
module.exports = defineConfig({
admin: {
path: `/dashboard`,
},
// ...
})
```