- Notifications
You must be signed in to change notification settings - Fork 0
Postgres Extensions
Beau Barker edited this page Oct 8, 2025 · 1 revision
SuperStack supports PostgreSQL extensions, letting you add powerful features like cryptographic functions or JWT handling.
Some extensions (like pgjwt) must be compiled manually.
git clone https://github.com/michelp/pgjwt postgres/pgjwtEdit the Postgres Dockerfile to install build tools and compile the extension:
RUN apt-get update && apt-get install -y \ build-essential \ postgresql-server-dev-17 # pgjwt - used by the auth schemaCOPY ./pgjwt /pgjwt WORKDIR /pgjwt RUN make && make install # Reset workdirWORKDIR /var/lib/postgresql🧼 Set
WORKDIRback to the default to avoid unintended effects.
docker compose build postgresThat’s it — the extension is now available to load in your migrations.
To load extensions, create a migration file such as:
create extension pgcrypto;
⚠️ create extensionis non-transactional, so don’t wrap this inBEGIN/COMMIT.