Skip to content

Instantly share code, notes, and snippets.

@nfroidure
Created November 30, 2020 16:02
Show Gist options
  • Save nfroidure/79a52cc1bb27f939c1224af23ada0e7f to your computer and use it in GitHub Desktop.
Save nfroidure/79a52cc1bb27f939c1224af23ada0e7f to your computer and use it in GitHub Desktop.
Generate a PGSQL Graph
docker run \
-v $(pwd)/pgsql/docs:/home/schcrwlr/share \
--name schemacrawler \
--rm -i -t \
--entrypoint=/bin/bash schemacrawler/schemacrawler \
-c "/opt/schemacrawler/schemacrawler.sh --command=schema --output-format=png --output-file=/home/schcrwlr/share/graph.png --server=postgresql --host=\$(/sbin/ip route|awk '/default/ { print \$3 }') --port=15432 --database=diagrams --schemas=public --user=postgres --password=mysecretpassword --info-level=maximum --log-level=ALL"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment