Last active
March 26, 2025 07:27
-
-
Save bokwoon95/beb833800d575913022df1b99ab6bdfb to your computer and use it in GitHub Desktop.
How to run Docker SchemaSpy on a locally running Postgres
This file contains hidden or 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
docker run -v "$PWD/schemaspy_output:/output" schemaspy/schemaspy:latest \ | |
-t pgsql \ | |
-host host.docker.internal \ | |
-port 5432 \ | |
-db my_database \ | |
-u my_username \ | |
-p my_password \ | |
-vizjs | |
# -host needs to be host.docker.internal to refer to your local machine's localhost, | |
# not the schemaspy container's localhost. Schemaspy's docker documentation for this is horrible. | |
# -vizjs is optional depending on whether you want to use the graphviz depedency or the embedded viz.js. | |
# If you are running schemaspy natively (without docker) I would most certainly recommend using viz.js | |
# because getting graphviz installed is a $$ PITA. Especially on macOS. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment