Skip to content

Instantly share code, notes, and snippets.

@edgarrmondragon
Last active March 15, 2024 14:04
Show Gist options
  • Save edgarrmondragon/49de4263cecc5bb98577eaa5bbcad807 to your computer and use it in GitHub Desktop.
Save edgarrmondragon/49de4263cecc5bb98577eaa5bbcad807 to your computer and use it in GitHub Desktop.
Generate SchemaSpy database documentation using docker-compose
# You might need to run `sudo chown -R $USER schemaspy/`
version: '3'
services:
postgres:
image: postgres
schemaspy:
image: schemaspy/schemaspy:snapshot
volumes:
- ./schemaspy/output:/output
- ./schemaspy/config:/config
container_name: "schemaspy_local"
command: [
"-configFile",
"/config/schemaspy.properties",
"-imageformat",
"svg"
]
depends_on:
- postgres
network_mode: "service:postgres"
# type of database. Run with -dbhelp for details
schemaspy.t=pgsql
# database properties: host, port number, name user, password
schemaspy.host=postgres
schemaspy.db=postgres
schemaspy.u=postgres
# db scheme for which generate diagrams
schemaspy.s=public
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment