This document provides advanced project documentation that goes beyond the initial onboarding process.
Besides using the default development environment via maevsi/stack, you can also configure a local standalone PostgreSQL database for use with Sqitch.
This standalone setup is lighter but requires you to manually configure local services that are compatible with the maevsi/stack production deployment setup.
Instead of using the package script (npx npm run deploy) to invoke Sqitch, you can call the Sqitch executable directly:
./src/sqitch deploy <command> [options]The database structure diagram embedded in the main README is generated using SchemaCrawler.
To create/update the diagram, follow these steps:
-
Start
maevsi/stackas described in the maevsi/vibetype README. -
Run the SchemaCrawler container:
docker run -v /run/postgresql/:/run/postgresql/ --network=host --name schemacrawler --rm -it --user=0:0 --entrypoint=/bin/bash schemacrawler/schemacrawler
-
Connect to the container as user
schcrwlr(you can use Portainer or similar tools). -
Inside the container, run:
schemacrawler --server=postgresql --database=vibetype --user=postgres --password=postgres \ --command=schema --info-level=maximum --output-format=png --output-file=graph.png --schemas=vibetype.* -
Reconnect to the container as
rootand install curl:apk update && apk add curl -
Upload the generated diagram:
curl -i -F file="@graph.png" "https://tmpfiles.org/api/v1/upload"
-
Click the link from the output to download the diagram image.