Skip to content

docs(CONTRIBUTING.md): update steps for adding a new extension #1691

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
# Welcome to Supabase Postgres contributing guide

## Adding a new extension
## Adding a New Extension

Extensions can either be built from source or installed through a debian package. In general, you want to add the installation commands for your extension to the [Dockerfile](Dockerfile) following the steps below.
Supabase Postgres supports multiple Dockerfiles for different versions and deployment scenarios (e.g., `Dockerfile-15`, `Dockerfile-17`, `Dockerfile-kubernetes`, `Dockerfile-orioledb-17`).

1. Create a [build stage](Dockerfile#L777) named after your extension.
2. Add build args that specify the extension's [release version](Dockerfile#L37).
3. If your extension is published as a package, download it to `/tmp/<name>.deb` using the [ADD command](Dockerfile#L705).
4. If you need to build the extensions from source, use [checkinstall](Dockerfile#L791) to create a `/tmp/<name>.deb` package.
5. Copy your extension's package from build stage to [extensions stage](Dockerfile#L851).
> Instructions for [adding extensions](https://github.com/supabase/postgres/blob/develop/nix/docs/adding-new-package.md)
Here's a minimal example:

Expand Down