Skip to content

Commit d20716a

Browse files
committed
docs: add todo
1 parent d442448 commit d20716a

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

docs/TODO.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# TODO
2+
3+
## CI / Releases
4+
5+
- [ ] **Compile PostgreSQL extension against both PG15 and PG17**
6+
- The `postgres-build` CI job currently hardcodes PG17 (`postgresql-server-dev-17`)
7+
- Add a matrix over `['15', '17']` matching the existing `postgres-test` job
8+
- Name artifacts with the PG version: `cloudsync-postgresql-linux-x86_64-pg17-1.0.0.tar.gz`
9+
- Files compiled against one major PG version will not load on another
10+
- **This is a prerequisite for the standard Dockerfile improvement below**
11+
12+
## With Docker
13+
14+
Decision: do not publish to a registry. Instead provide Dockerfiles users build themselves.
15+
16+
### Standard PostgreSQL (`Dockerfile`)
17+
18+
- [ ] **Update `Dockerfile` to download pre-compiled extension from GitHub releases instead of building from source**
19+
- Currently copies the full source tree and compiles inside the container
20+
- New approach: accept `--build-arg CLOUDSYNC_VERSION=1.0.0`, fetch the matching tarball from GitHub releases at build time
21+
- Dockerfile detects PG major version and architecture automatically to pick the right tarball
22+
- User only needs the Dockerfile — no full repo clone required
23+
- Example: `docker build --build-arg POSTGRES_TAG=17 --build-arg CLOUDSYNC_VERSION=1.0.0 -t my-cloudsync-postgres .`
24+
- **Blocked by:** release artifacts having PG version in the filename (see CI/Releases above)
25+
- **User flow (fresh):** Build image → use in `docker-compose.yml``CREATE EXTENSION cloudsync`
26+
- **User flow (existing):** Build image → swap in `docker-compose.yml` → restart → `CREATE EXTENSION cloudsync`
27+
28+
### Supabase (`Dockerfile.supabase`)
29+
30+
- Supabase uses a non-standard Nix-based PostgreSQL build — pre-compiled `.so` from releases will not work, must always compile from source
31+
- [ ] **Update `Dockerfile.supabase` to download source tarball from GitHub releases instead of using `COPY src/`**
32+
- Currently uses `COPY src/`, `COPY modules/`, `COPY Makefile` — requires the user to run `docker build` from inside the cloned repo
33+
- New approach: accept `--build-arg CLOUDSYNC_VERSION=1.0.0`, fetch the source tarball from GitHub releases at build time and compile inside the container
34+
- GitHub automatically generates source tarballs for every release (`Source code (tar.gz)`)
35+
- User only needs the `Dockerfile.supabase` — no repo clone required
36+
- Example: `docker build -f Dockerfile.supabase --build-arg SUPABASE_POSTGRES_TAG=15.8.1.085 --build-arg CLOUDSYNC_VERSION=1.0.0 -t my-cloudsync-supabase-postgres .`
37+
- **User flow (fresh):** Build image → replace default Supabase postgres image in `docker-compose.yml``CREATE EXTENSION cloudsync`
38+
- **User flow (existing):** Build image → follow Supabase's update guide to swap the postgres image → `CREATE EXTENSION cloudsync`
39+
40+
## Without Docker
41+
42+
For users with an existing native PostgreSQL installation (bare metal or VM, not containerized).
43+
44+
- [ ] **Ensure release tarballs are usable for native installs**
45+
- User downloads the right tarball from GitHub releases (correct OS + arch + PG version)
46+
- Extracts 3 files: `cloudsync.so`, `cloudsync--1.0.sql`, `cloudsync.control`
47+
- Copies them to the PostgreSQL extension directories:
48+
```bash
49+
cp cloudsync.so $(pg_config --pkglibdir)/
50+
cp cloudsync--1.0.sql cloudsync.control $(pg_config --sharedir)/extension/
51+
```
52+
- Runs `CREATE EXTENSION cloudsync;` — done, no Docker or compiler needed
53+
- **Blocked by:** release artifacts having PG version in the filename (see CI/Releases above)

0 commit comments

Comments
 (0)