docs(nix): replace generic docs with upstream links (#2545) · supabase/postgres@fd9294e · GitHub
Skip to content

Commit fd9294e

Browse files
brainrakeclaude
andauthored
docs(nix): replace generic docs with upstream links (#2545)
* docs(nix): replace generic docs with upstream links Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * docs(nix): use official installer links and restore intro section Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * docs(nix): reword start-here heading and closing line Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * docs: fix stale commands, paths, and versions Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * docs(nix): fold flake-parts architecture into directory structure Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * docs(nix): prefer nix run over nix profile install Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * docs(supascan): drop nix profile install example Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent b532485 commit fd9294e

31 files changed

Lines changed: 121 additions & 4686 deletions

‎CLAUDE.md‎

Lines changed: 0 additions & 1 deletion

‎CONTRIBUTING.md‎

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,7 @@
22

33
## Adding a new extension
44

5-
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.
6-
7-
1. Create a [build stage](Dockerfile#L777) named after your extension.
8-
2. Add build args that specify the extension's [release version](Dockerfile#L37).
9-
3. If your extension is published as a package, download it to `/tmp/<name>.deb` using the [ADD command](Dockerfile#L705).
10-
4. If you need to build the extensions from source, use [checkinstall](Dockerfile#L791) to create a `/tmp/<name>.deb` package.
11-
5. Copy your extension's package from build stage to [extensions stage](Dockerfile#L851).
12-
13-
Here's a minimal example:
14-
15-
```dockerfile
16-
ARG pg_graphql_release=1.1.0
17-
18-
####################
19-
# 19-pg_graphql.yml
20-
####################
21-
FROM base as pg_graphql
22-
# Download package archive
23-
ARG pg_graphql_release
24-
ADD "https://github.com/supabase/pg_graphql/releases/download/v${pg_graphql_release}/pg_graphql-v${pg_graphql_release}-pg${postgresql_major}-${TARGETARCH}-linux-gnu.deb" \
25-
/tmp/pg_graphql.deb
26-
27-
####################
28-
# Collect extension packages
29-
####################
30-
FROM scratch as extensions
31-
COPY --from=pg_graphql /tmp/*.deb /tmp/
32-
```
33-
34-
Using this process maximises the effectiveness of Docker layer caching, which significantly speeds up our CI builds.
5+
Extensions are built with Nix. Follow [Adding new packages](nix/docs/adding-new-package.md).
356

367
## Testing an extension
378

@@ -43,4 +14,4 @@ create extension if not exists wrappers with schema "extensions";
4314
ROLLBACK;
4415
```
4516

46-
This test will be run as part of CI to check that your extension can be enabled successfully from the final Docker image.
17+
This test runs as part of `nix flake check` and checks that your extension can be enabled.

‎docs/multigres-image.md‎

Lines changed: 1 addition & 1 deletion

0 commit comments

Comments
 (0)