Skip to content

Repository files navigation

asset-docs-postgres-db

A repo to define and track the Postgres/PostGIS requirements for the Docker image supporting Asset Docs Postgres instances.

Docker Build

docker build -t asset-docs-postgres-db:latest .

...or...

docker compose build

Run

docker compose up

Optional Mock Data Seeding

postinit templates prefixed 60+: mock seed SQL for testing (runs only when enabled)

To enable mock seed data locally:

ADDB_ENABLE_MOCK_DATA=true docker compose up --build

JWT Auth Setup

To configure asymmetric JWT validation (using public/private keys to sign and then later verify a JWT auth header), PostgREST needs to know which public keys are acceptable when validating a signed JWT.

This is retrieved from Authentik (or your Identity Provider of choice) by querying the JWKS URL for the relevant app. In the case of Asset Docs, the keys can be retrieved like so:

curl --silent "https://ego.srv.axds.co/application/o/asset-docs/jwks/" | jq -Rsa .

...which returns an output like:

"{\"keys\": [{\"alg\": \"RS256\", \"kid\":...

...which is suitable for inclusion in the .env file for the

Note: when rebuilding with table changes, run docker-compose kill -s SIGUSR1 postgrest after docker-compose up so that postgrest rebuilds schema cache

Another note: if running on windows, you might need to convert all line endings to linux:

git ls-files -z | xargs -0 dos2unix

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages