by blr246 · 7y ago · 0 comments
Here's the basic recipe:
1. Spin up a fresh Postgres instance on Docker using -P to claim an available ephemeral TCP port
2. Use `docker inspect` to read the Postgres port
3. Run DDL script on the fresh instance
4. Run SchemaCrawler Docker container using --network host option so it can connect to Postgres
and using -v so it can save a schema image to the host filesystem
This entire process is a `/bin` script checked into our repo, so we can update `/doc/db-schema.png` any time. It takes about 15s total since we have to pause for the Postgres instance to come online.No comments yet.