-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: added troubleshooting for postgres docker container (#5629)
* docs: added troubleshooting for postgres docker container * fix component name
- Loading branch information
1 parent
26617ce
commit edeec07
Showing
5 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
www/apps/docs/content/troubleshooting/database-errors/_docker.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
When connecting your Medusa backend to a PostgreSQL Docker container, make sure the `5432` port is exposed. | ||
|
||
To do that, either pass the `-p` option to the `docker run` command. For example: | ||
|
||
```bash | ||
docker run -d -p 5432:5432 --name some-postgres -e POSTGRES_PASSWORD=supersecret postgres | ||
``` | ||
|
||
Or, if you're using Docker Desktop, you can provide the option under the container's "Optional settings" collapsable. | ||
|
||
![Setting Port option in Docker Desktop](https://res.cloudinary.com/dza7lstvk/image/upload/v1699952615/Medusa%20Docs/Screenshots/Screenshot_2023-11-14_at_10.56.04_AM_nsur0q.png) | ||
|
||
If you expose the PostgreSQL docker container at a port other than `5432`, make sure to include it in your database URL. | ||
|
||
When installing Medusa with `create-medusa-app`, you can provide a database URL with the different port using the `--db-url` option. | ||
|
||
For example: | ||
|
||
```bash | ||
npx create-medusa-app@latest --db-url "postgres://user:password@localhost:<YOUR_PORT>/medusa-store" | ||
``` | ||
|
||
Where `<YOUR_PORT>` is the exposed port if it's different than `5432`. | ||
|
||
Refer to the [database_url configuration documentation](../../development/backend/configurations.md#database_url) to learn how to set the database URL for an installed Medusa backend. |
edeec07
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
docs-ui – ./www/apps/ui
docs-ui.vercel.app
docs-ui-git-develop-medusajs.vercel.app
docs-ui-medusajs.vercel.app
edeec07
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
api-reference – ./www/apps/api-reference
api-reference-medusajs.vercel.app
api-reference-git-develop-medusajs.vercel.app
docs.medusajs.com
api-reference-delta.vercel.app
edeec07
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
medusa-docs – ./www/apps/docs
medusa-docs-medusajs.vercel.app
medusa-docs-git-develop-medusajs.vercel.app
medusa-docs.vercel.app