Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
210 commits
Select commit Hold shift + click to select a range
c5187b3
feat: add support for sorting in list v2 endpoint (#749)
itslenny Sep 15, 2025
a4cc5d5
fix: upgrade pgboss version (#762)
fenos Sep 16, 2025
3d9254a
fix: cleaning up of prefixes under heavy concurrency (#764)
fenos Sep 19, 2025
33236a0
fix: listObject v1 s3 endpoint (#765)
fenos Sep 22, 2025
84dfe26
fix: pagination for list-object-v1 s3 (#766)
fenos Sep 22, 2025
b66adbd
fix: update level on object update (#768)
fenos Sep 25, 2025
2bd8fdd
fix: rollback prefix migration (#770)
fenos Sep 25, 2025
8c7bc85
chore(deps): bump axios from 1.9.0 to 1.12.0 (#760)
dependabot[bot] Sep 26, 2025
4155c4c
feat: add cluster discovery for eks (#767)
kangmingtay Sep 27, 2025
2a0c3ef
build: automatically cancel old tests/build on new push #1545 (#772)
kevcodez Oct 6, 2025
3562ba0
fix: ensure failure exit code is properly reported (#778)
sweatybridge Oct 8, 2025
b33dd33
fix: validate bucket name before attempting to access (#784)
itslenny Oct 22, 2025
f624371
fix: gracefully handle incomplete multipart uploads (#788)
itslenny Oct 28, 2025
74f6195
chore: bump fastify multipart patch version (#790)
itslenny Oct 29, 2025
fbc937c
fix: bump storage version for fastify multipart update (#791)
itslenny Oct 29, 2025
0f7b2cd
fix: use RFC3689 encoding for S3 signature v4 (#793)
itslenny Nov 1, 2025
76df298
docs: correct 'light-weight' to 'lightweight' (#794)
jarrensj Nov 4, 2025
6ba23e4
feat: vector buckets (#774)
fenos Nov 5, 2025
5c8643b
chore: : added tests for queues, object prefixes functions and for th…
georgRusanov Nov 7, 2025
5008f65
fix: handle timeout expired errors (connectionTimeoutMillis) as 544s …
itslenny Nov 10, 2025
340d1b3
fix: backport missing grants on buckets & objects
soedirgo Jun 16, 2025
77a29ab
chore: update migration types
soedirgo Nov 11, 2025
174f294
fix: add X-Robots-Tag header to prevent robot indexing and following …
itslenny Nov 12, 2025
b9acc7c
feat: add support for GetObject() custom response headers in S3 proto…
itslenny Nov 13, 2025
90250f2
feat: add analytics bucket sharding (#796)
fenos Nov 14, 2025
4f66e94
fix: primary key migration (#800)
fenos Nov 17, 2025
c9a912a
feat: add buckets & objects grants for `postgres`
soedirgo Nov 19, 2025
1a60670
fix: migrations table existence check
soedirgo Nov 28, 2025
53e803c
fix: table existence check for multitenant
soedirgo Dec 1, 2025
cce047b
feat: add version endpoint to admin api (#811)
itslenny Dec 9, 2025
e89d526
fix: make storage migrations idempotent (#805)
TylerHillery Dec 17, 2025
fbf3248
fix: timing issue in S3 locker to prevent zombie locks (#812)
itslenny Dec 18, 2025
d0ce99d
fix: remove duplicate slash in tus upload url generator (#801)
itslenny Dec 29, 2025
40ae729
fix: prevent access to files outside of storage path in file backend …
itslenny Dec 30, 2025
f0dfe03
fix: increase put vectors body limit (#820)
fenos Jan 8, 2026
b5b782f
feat: optimised search query (#827)
fenos Jan 27, 2026
9fbc2a0
fix: minor orphan object client minor fixes and enhancements (#830)
itslenny Jan 28, 2026
bea2242
feat: prevent deleting storage schema rows via direct SQL query (#817)
itslenny Jan 28, 2026
31b5594
fix: add server execution time on logs (#831)
fenos Jan 28, 2026
0a39687
fix: onSend hook (#832)
fenos Jan 28, 2026
6c2355f
fix: return reply on healthcheck (#833)
fenos Jan 28, 2026
f3901ef
feat: otel metrics (#819)
fenos Jan 30, 2026
bfc3582
fix: percentile metrics (#837)
fenos Feb 2, 2026
3274d56
fix: do not allow setting invalid header values via S3 response heade…
itslenny Feb 3, 2026
3c94aa6
fix: return content-type if missing (#840)
ferhatelmas Feb 4, 2026
de91ad1
fix: distinct xattr for etag in linux file backend (#842)
ferhatelmas Feb 4, 2026
2b74634
feat: cancellation stricter timeouts (#841)
fenos Feb 4, 2026
7a993b5
fix: migration types (#845)
fenos Feb 5, 2026
116ae45
fix: iceberg streaming fix (#847)
fenos Feb 5, 2026
35ca88b
fix: typo in user facing error message (#795)
ferhatelmas Feb 5, 2026
9d67178
fix: part upload without pipeline (#848)
fenos Feb 5, 2026
912fc21
fix: aws stream buffer (#850)
fenos Feb 5, 2026
d7a94b1
fix: search function to return correct case of prefixes in list v1 (#…
itslenny Feb 6, 2026
72f9cf3
fix: return reply on tenant feature (#852)
fenos Feb 7, 2026
6407cfd
chore(deps): Upgrade GitHub Actions for Node 24 compatibility (#828)
salmanmkc Feb 9, 2026
85dfe22
Upgrade GitHub Actions to latest versions
salmanmkc Jan 25, 2026
59f5d87
chore: add codeowners
ferhatelmas Feb 9, 2026
2e528cc
chore: use node24 for semantic release
ferhatelmas Feb 9, 2026
fa0f7d8
fix: coveralls badge (#857)
TylerHillery Feb 9, 2026
f29850e
chore: remove duplicated checks in TUS routes
ferhatelmas Feb 13, 2026
026039c
chore(deps): bump the npm_and_yarn group across 1 directory with 2 up…
dependabot[bot] Feb 16, 2026
26eed58
fix(move-object): cleanup destination on failure
ferhatelmas Feb 17, 2026
6da1b33
chore(env): add DATABASE_APPLICATION_NAME to configuration (#864)
TylerHillery Feb 18, 2026
7b3d590
chore: drop old/leftover fly config
ferhatelmas Feb 16, 2026
af652c2
fix: feature enablement in admin api (#853)
ferhatelmas Feb 19, 2026
2c131f3
fix(file-backend): return correct last modified in head object
ferhatelmas Feb 16, 2026
2a4fa0a
feat: delta metrics (#866)
fenos Feb 20, 2026
7d136dc
feat: support pgbouncer for multitenant database (#865)
fenos Feb 24, 2026
d00f908
fix: handle error gracefully (#868)
fenos Feb 24, 2026
8f2a769
chore(ci): mark test coverage optional in workflow
ferhatelmas Feb 25, 2026
9bcc4dd
docs: add deepwiki docs reference
ferhatelmas Feb 23, 2026
3327b2e
fix: webhook bucket for copy/move cross buckets
ferhatelmas Feb 25, 2026
e6d9a33
chore: use biome for format
ferhatelmas Feb 25, 2026
91fefd6
chore: switch into biome and format all md/yml via prettier
ferhatelmas Feb 26, 2026
de94712
chore: use biome for linting
ferhatelmas Feb 26, 2026
73f0bfc
chore: enable consistent object definition rule in lint
ferhatelmas Feb 26, 2026
bd2fac7
chore: organizeImports automatically with biome
ferhatelmas Feb 26, 2026
58759c5
fix: Add query timeouts to multitenant db queries to prevent stuck mu…
itslenny Feb 27, 2026
da8209a
feat: remove crypto-js in favour of crypto native dependency (#525)
fenos Feb 27, 2026
bdd0ecf
fix: add explicit metric shutdown for clean exit (#870)
ferhatelmas Mar 2, 2026
32ccf47
feat(pgbouncer): set application_name on server and client connection…
TylerHillery Mar 2, 2026
734fea0
fix: escape wildcard characters for list (#882)
ferhatelmas Mar 3, 2026
85e6efe
fix: path traversal in file backend (#883)
ferhatelmas Mar 3, 2026
228c507
chore: drop crypto-js in favor of hardcoded vectors (#885)
ferhatelmas Mar 3, 2026
f1b896b
fix: start tracing only if enabled and endpoint exists (#884)
ferhatelmas Mar 3, 2026
f4fa152
fix: refactor migration types to drop glob dependency (#886)
ferhatelmas Mar 4, 2026
f9b0815
fix: drop unused connection-string dependency (#889)
ferhatelmas Mar 4, 2026
d8dba53
fix: exclude network metric (#891)
fenos Mar 4, 2026
3788c85
fix: vector list wildcards and pagination (#894)
ferhatelmas Mar 5, 2026
bb602aa
fix: improve metrics performance (#890)
fenos Mar 5, 2026
52ed538
fix: run tests with orioledb (#895)
ferhatelmas Mar 6, 2026
722e37b
fix: refactor use natives to drop md5-file and multistream (#888)
ferhatelmas Mar 6, 2026
0c9fb34
feat: upgrade fastify to v5 (#893)
ferhatelmas Mar 6, 2026
5ecaa71
fix: improve biome lint configuration (#892)
ferhatelmas Mar 6, 2026
bd1edfd
fix: remanining security advisory (#896)
ferhatelmas Mar 6, 2026
53462ff
feat: add orioledb support for vector buckets (#897)
ferhatelmas Mar 9, 2026
b8d9d40
fix: drop content-type hook covered by fastify v5 (#901)
ferhatelmas Mar 11, 2026
c82f9dd
fix: improve performance, upgraded otel fastify (#902)
fenos Mar 11, 2026
90936a8
fix: otel dashboard top panels (#904)
ferhatelmas Mar 11, 2026
a158da1
fix: s3 stream pipeline ordering (#906)
ferhatelmas Mar 12, 2026
be435a0
fix: prevent decoded content length spoofing (#907)
ferhatelmas Mar 13, 2026
bba20c2
feat: add storagePublicUrl for tus (#900)
aantti Mar 16, 2026
919fa72
fix: enable no unused variable rule (#910)
ferhatelmas Mar 16, 2026
757edbe
fix: enable no unnecessary conditions rule (#911)
ferhatelmas Mar 16, 2026
b523dc1
fix: enable throw error and no common js rules (#912)
ferhatelmas Mar 17, 2026
d2f47ef
fix: bump lru-cache (#913)
ferhatelmas Mar 17, 2026
d9fb9c0
fix: mark completed till validation for migration reset (#916)
ferhatelmas Mar 18, 2026
72a8f9b
fix: add fast-xml-parser override (#918)
ferhatelmas Mar 18, 2026
003d5f5
fix: flaky abort tests (#920)
ferhatelmas Mar 19, 2026
31b6bad
fix: validate response headers before sending, prevent invalid transf…
itslenny Mar 20, 2026
f9be2f6
fix: drop mustache dependency (#923)
ferhatelmas Mar 20, 2026
e709e63
fix: progressive migrations (#919)
ferhatelmas Mar 23, 2026
3e22a42
fix: stream upload to S3 (#905)
fenos Mar 23, 2026
19f148e
chore: pin actions to sha (#925)
staaldraad Mar 25, 2026
78a2df2
chore: xml bump for sec (#927)
ferhatelmas Mar 25, 2026
d3e6637
fix: admin handlers for migrations (#929)
ferhatelmas Mar 25, 2026
c83fecf
chore(deps): bump the npm_and_yarn group across 1 directory with 2 up…
dependabot[bot] Mar 25, 2026
9335559
chore(deps-dev): bump picomatch from 2.3.1 to 2.3.2 in the npm_and_ya…
dependabot[bot] Mar 26, 2026
60596ee
chore: replace usage of PAT with GH app (#926)
staaldraad Mar 26, 2026
81d4ec1
fix: update api spec, add admin api spec, add release action to publi…
itslenny Mar 26, 2026
c00653f
fix: tracing hidden metric pipeline (#924)
ferhatelmas Mar 26, 2026
5fedc1e
fix: duplication in async abort controller (#933)
ferhatelmas Mar 26, 2026
a463143
fix: enable prom exporter only if config set (#934)
ferhatelmas Mar 26, 2026
fd89bfb
fix: bump ts/jest (#935)
ferhatelmas Mar 26, 2026
7459d65
feat: add user metadata support for RLS policies (#825)
TylerHillery Mar 26, 2026
92f0230
fix: drop ts-node-dev dep (#936)
ferhatelmas Mar 26, 2026
c4d2719
fix: use STORAGE_PUBLIC_URL in S3 protocol too (#914)
aantti Mar 27, 2026
1e142b1
feat: support for watt process runner (#917)
fenos Mar 27, 2026
b00180f
chore(deps-dev): bump handlebars from 4.7.8 to 4.7.9 in the npm_and_y…
dependabot[bot] Mar 27, 2026
c8ceb90
fix: bump build target (#937)
ferhatelmas Mar 27, 2026
a69b0e6
feat: add RLS ooperation ergonomics (#903)
ferhatelmas Mar 27, 2026
bf33366
fix: use parameters in pgboss jobs (#940)
staaldraad Mar 27, 2026
b0cde79
fix: manual admin tenant migration state recording (#939)
ferhatelmas Mar 27, 2026
a5bd107
chore: try blacksmith (#941)
ferhatelmas Mar 27, 2026
6d4a5a0
feat: add monitored cache wrapper and use (#915)
ferhatelmas Mar 27, 2026
5c688ab
fix: use parameterized queries in upgrade-v10.ts (#946)
oniani1 Mar 27, 2026
ecd6bbf
chore(deps): bump the npm_and_yarn group across 1 directory with 1 up…
dependabot[bot] Mar 27, 2026
fb816d7
fix: include docs into release not to mutate (#944)
ferhatelmas Mar 30, 2026
734bc61
fix: improved error handling and normalization (#947)
itslenny Mar 30, 2026
dd64241
fix: harden jwk cache test wait (#948)
ferhatelmas Mar 30, 2026
98bd5cb
chore: harden coverage detection (#949)
ferhatelmas Mar 30, 2026
9e8c435
fix: drop fs-extra for native fs/promises (#950)
ferhatelmas Mar 30, 2026
6d8353b
chore: make build required step and run jest transpile only (#943)
ferhatelmas Mar 30, 2026
ba9e5f0
fix: scanner pagination to follow token (#951)
ferhatelmas Mar 31, 2026
ef63f05
fix: bump tus s3-store version, fixes potential uncaught exception (#…
itslenny Mar 31, 2026
dc92a02
fix: allow empty json for multipart (#953)
ferhatelmas Mar 31, 2026
46cd89c
fix: handle json content type in delete tenant (#956)
ferhatelmas Mar 31, 2026
18d9386
fix: no tenant cache for run migrations event (#957)
ferhatelmas Apr 1, 2026
8b79629
fix: wrap passthrough proxy for binary (#960)
ferhatelmas Apr 2, 2026
b1d7d9a
fix: empty bucket rls check (#958)
ferhatelmas Apr 2, 2026
c58e139
fix: use resilient multipart (#962)
ferhatelmas Apr 2, 2026
1587bf2
fix: bump aws sdk and drop overrides (#963)
ferhatelmas Apr 3, 2026
55b13d8
chore(deps): bump lodash from 4.17.23 to 4.18.1 in the npm_and_yarn g…
dependabot[bot] Apr 3, 2026
b7d011c
fix: include disableEvents in PUT tenant handler (#970)
oniani1 Apr 6, 2026
6e988b5
fix: correct boolean check in doesSchemaExists (#968)
oniani1 Apr 6, 2026
bc9c79f
fix: read correct property name in PUT tenant handler (#967)
oniani1 Apr 6, 2026
8cbddf8
fix: add tests for admin tenant config handler (#971)
ferhatelmas Apr 6, 2026
cd8ad47
fix: report errors in orphan and test entity expansion (#965)
ferhatelmas Apr 6, 2026
553a610
fix: add admin post for disableEvents/imageTransformation (#972)
ferhatelmas Apr 6, 2026
45cb22a
fix: allocate less in interim (#973)
ferhatelmas Apr 6, 2026
a5e56e2
fix: allow empty json body for delete/empty bucket (#974)
ferhatelmas Apr 6, 2026
d273bc6
chore: add dependabot config (#955)
ferhatelmas Apr 6, 2026
8906da1
chore: use sample env files for tests (#981)
ferhatelmas Apr 7, 2026
8183728
fix: correct parameter name in headObject and ChecksumCRC32C mapping …
oniani1 Apr 7, 2026
77271c1
fix: add regression tests for checksums (#988)
ferhatelmas Apr 7, 2026
126295b
fix: use correct ErrorCode values for InvalidParameter, FeatureNotEna…
oniani1 Apr 7, 2026
8c00ea0
fix: use transaction handle for tenant insert in POST handler (#987)
oniani1 Apr 7, 2026
4553485
chore(deps): bump @opentelemetry/instrumentation-knex from 0.53.1 to …
dependabot[bot] Apr 7, 2026
8ce908f
fix: add regression tests for admin tenant tx usage (#991)
ferhatelmas Apr 7, 2026
faabbd0
chore(deps): bump jose from 6.1.0 to 6.2.2 (#979)
dependabot[bot] Apr 7, 2026
2fd71cc
chore(deps): bump @aws-sdk/s3-request-presigner from 3.1023.0 to 3.10…
dependabot[bot] Apr 7, 2026
7cb07b5
fix: add regression tests for error codes (#990)
ferhatelmas Apr 7, 2026
f6e193a
fix: stats for single shard (#992)
ferhatelmas Apr 8, 2026
3e426fc
fix: mime validation for multipart (#995)
ferhatelmas Apr 9, 2026
41cfe75
fix: no mutation for caller owned payloads (#996)
ferhatelmas Apr 9, 2026
4729111
feat: add hit ratio tenant pool cache (#1002)
ferhatelmas Apr 10, 2026
6e20bc3
feat: create admin endpoint to roll tenant url signing jwk (#999)
itslenny Apr 10, 2026
834e00c
fix: use max for cache size/entries in dash (#1008)
ferhatelmas Apr 10, 2026
2d66082
chore(deps): bump ip-address from 10.0.1 to 10.1.0 (#1005)
dependabot[bot] Apr 13, 2026
8953328
chore: improve s3 delete objects result construction (#1014)
ferhatelmas Apr 13, 2026
01b3b52
chore: add cool down for dependabot (#1013)
ferhatelmas Apr 13, 2026
12d70ce
fix: improve sigv4 stream upload performance (#993)
ferhatelmas Apr 13, 2026
a49ab6a
feat: add eviction metric tenant pool cache (#1012)
ferhatelmas Apr 13, 2026
6202eb8
fix: drop any in abort controller (#997)
ferhatelmas Apr 14, 2026
b2fc201
chore(deps): bump @opentelemetry/sdk-metrics from 2.6.0 to 2.6.1 (#1006)
dependabot[bot] Apr 14, 2026
5d1db21
feat: intro vitest & split units (#1000)
ferhatelmas Apr 14, 2026
9fc93ca
chore: pin npm (#1019)
ferhatelmas Apr 14, 2026
c863126
feat: add outcome logging for tenant pools (#1018)
ferhatelmas Apr 14, 2026
1c2b1dd
fix: register Watt close handler (#1009)
mcollina Apr 15, 2026
2e9e383
fix: cap expires in and return bad request (#1020)
ferhatelmas Apr 15, 2026
b4a3336
fix: use correct JSON Schema keyword in getSignedURLs response (#1024)
oniani1 Apr 15, 2026
09c3714
fix: add lifecycle logs for empty bucket operations (#1016)
itslenny Apr 15, 2026
d0c2d99
chore: move jwt to vitest and handle any (#1021)
ferhatelmas Apr 16, 2026
0a6fdec
chore: simplify migration memoize (#1022)
ferhatelmas Apr 16, 2026
ee863f2
chore: more test extraction to vitest & handle any (#1025)
ferhatelmas Apr 16, 2026
2a2e561
chore: do not start monitoring stack for tests (#1026)
ferhatelmas Apr 16, 2026
fef8da0
fix: fastify synthetic shutdown reply in logger (#1028)
ferhatelmas Apr 16, 2026
473aa5c
fix: allow webp as transformation option (#1011)
fenos Apr 16, 2026
2b673e0
fix: drop jest and its dependencies (#1027)
ferhatelmas Apr 16, 2026
0960cc6
chore(deps): bump @fastify/otel from 0.17.1 to 0.18.1 (#1004)
dependabot[bot] Apr 16, 2026
613b9b4
fix: reject oversized header names in isValidHeader (#1030)
oniani1 Apr 17, 2026
9e1b8a9
fix: validate before date in DELETE orphan-objects (#1032)
oniani1 Apr 17, 2026
d2a2a66
chore: handle any in tests (#1033)
ferhatelmas Apr 17, 2026
6f587b6
chore(deps): bump @platformatic/wattpm-pprof-capture from 3.52.0 to 3…
dependabot[bot] Apr 17, 2026
f17973e
feat: add admin pprof and its client (#1037)
ferhatelmas Apr 20, 2026
ba6dd3a
chore: drop axios from orphan script (#1038)
ferhatelmas Apr 21, 2026
cad2f17
chore(deps): bump @opentelemetry/exporter-metrics-otlp-grpc from 0.21…
dependabot[bot] Apr 21, 2026
8e93710
fix: prevent update bucket with missing payload (#1040)
itslenny Apr 21, 2026
545a01d
add s3OmitPrefixFromCanonicalUri to fix issue with GDAL
benboothby Apr 23, 2026
ad0c416
Merge branch 'master' of https://github.com/millcrest/storage into ne…
benboothby Apr 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
211 changes: 123 additions & 88 deletions .docker/docker-compose-infra.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# docker-compose.yml

services:

tenant_db:
image: postgres:15
shm_size: '1gb'
shm_size: "1gb"
ports:
- '5432:5432'
- "5432:5432"
healthcheck:
test: [ "CMD-SHELL", "pg_isready", "-d", "postgres" ]
test: ["CMD-SHELL", "pg_isready", "-d", "postgres"]
interval: 5s
timeout: 60s
retries: 20
Expand All @@ -21,12 +20,12 @@ services:
multitenant_db:
image: postgres:15
ports:
- '5433:5432'
- "5433:5432"
configs:
- source: init.sql
target: /docker-entrypoint-initdb.d/init.sql
healthcheck:
test: [ "CMD-SHELL", "pg_isready", "-d", "postgres" ]
test: ["CMD-SHELL", "pg_isready", "-d", "postgres"]
interval: 5s
timeout: 60s
retries: 20
Expand All @@ -36,9 +35,11 @@ services:
POSTGRES_PASSWORD: postgres

pg_bouncer:
image: bitnami/pgbouncer:latest
image: bitnamilegacy/pgbouncer:latest
ports:
- 6453:6432
depends_on:
- tenant_db
environment:
POSTGRESQL_USERNAME: postgres
POSTGRESQL_HOST: tenant_db
Expand All @@ -47,76 +48,92 @@ services:
PGBOUNCER_IGNORE_STARTUP_PARAMETERS: "extra_float_digits, options"
PGBOUNCER_STATS_USERS: postgres

supavisor:
image: supabase/supavisor:1.1.23
depends_on:
multitenant_db:
condition: service_healthy
tenant_db:
condition: service_healthy
multitenant_pgbouncer:
image: bitnamilegacy/pgbouncer:latest
ports:
- 4000:4000
- 5452:5452
- 6543:6543
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:4000/api/health"]
interval: 2s
timeout: 10s
retries: 5
- 6454:6432
depends_on:
- multitenant_db
environment:
PORT: 4000
PROXY_PORT_SESSION: 5452
PROXY_PORT_TRANSACTION: 6543
DATABASE_URL: "ecto://postgres:postgres@multitenant_db:5432/postgres"
CLUSTER_POSTGRES: "true"
SECRET_KEY_BASE: "12345678901234567890121234567890123456789012345678903212345678901234567890123456789032123456789012345678901234567890323456789032"
VAULT_ENC_KEY: "12345678901234567890123456789032"
API_JWT_SECRET: "dev"
METRICS_JWT_SECRET: "dev"
REGION: "local"
ERL_AFLAGS: -proto_dist inet_tcp
command: sh -c "/app/bin/migrate && /app/bin/server"
POSTGRESQL_USERNAME: postgres
POSTGRESQL_HOST: multitenant_db
POSTGRESQL_PASSWORD: postgres
POSTGRESQL_DATABASE: postgres
POSTGRESQL_PORT: 5432
PGBOUNCER_POOL_MODE: transaction
PGBOUNCER_IGNORE_STARTUP_PARAMETERS: "extra_float_digits, options, statement_timeout"
PGBOUNCER_STATS_USERS: postgres

supavisor_setup:
image: supabase/supavisor:1.1.23
command: |
curl -X PUT \
"http://supavisor:4000/api/tenants/bjhaohmqunupljrqypxz" \
--header "Accept: application/json" \
--header "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJvbGUiOiJhbm9uIiwiaWF0IjoxNjQ1MTkyODI0LCJleHAiOjE5NjA3Njg4MjR9.M9jrxyvPLkUxWgOYSf5dNdJ8v_eRrq810ShFRT8N-6M" \
--header "Content-Type: application/json" \
--data-raw "{
\"tenant\": {
\"db_host\": \"tenant_db\",
\"db_port\": 5432,
\"db_database\": \"postgres\",
\"ip_version\": \"auto\",
\"require_user\": true,
\"upstream_ssl\": false,
\"enforce_ssl\": false,
\"default_max_clients\": 200,
\"default_pool_size\": 15,
\"users\": [
{
\"db_user\": \"postgres\",
\"db_password\": \"postgres\",
\"mode_type\": \"transaction\",
\"pool_size\": 15,
\"max_clients\": 200,
\"pool_checkout_timeout\": 5000
}
]
}
}"
depends_on:
supavisor:
condition: service_healthy
# supavisor:
# image: supabase/supavisor:1.1.23
# depends_on:
# multitenant_db:
# condition: service_healthy
# tenant_db:
# condition: service_healthy
# ports:
# - 4000:4000
# - 5452:5452
# - 6543:6543
# healthcheck:
# test: ["CMD", "curl", "-f", "http://localhost:4000/api/health"]
# interval: 2s
# timeout: 10s
# retries: 5
# environment:
# PORT: 4000
# PROXY_PORT_SESSION: 5452
# PROXY_PORT_TRANSACTION: 6543
# DATABASE_URL: "ecto://postgres:postgres@multitenant_db:5432/postgres"
# CLUSTER_POSTGRES: "true"
# SECRET_KEY_BASE: "12345678901234567890121234567890123456789012345678903212345678901234567890123456789032123456789012345678901234567890323456789032"
# VAULT_ENC_KEY: "12345678901234567890123456789032"
# API_JWT_SECRET: "dev"
# METRICS_JWT_SECRET: "dev"
# REGION: "local"
# ERL_AFLAGS: -proto_dist inet_tcp
# command: sh -c "/app/bin/migrate && /app/bin/server"
#
# supavisor_setup:
# image: supabase/supavisor:1.1.23
# command: |
# curl -X PUT \
# "http://supavisor:4000/api/tenants/bjhaohmqunupljrqypxz" \
# --header "Accept: application/json" \
# --header "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJvbGUiOiJhbm9uIiwiaWF0IjoxNjQ1MTkyODI0LCJleHAiOjE5NjA3Njg4MjR9.M9jrxyvPLkUxWgOYSf5dNdJ8v_eRrq810ShFRT8N-6M" \
# --header "Content-Type: application/json" \
# --data-raw "{
# \"tenant\": {
# \"db_host\": \"tenant_db\",
# \"db_port\": 5432,
# \"db_database\": \"postgres\",
# \"ip_version\": \"auto\",
# \"require_user\": true,
# \"upstream_ssl\": false,
# \"enforce_ssl\": false,
# \"default_max_clients\": 200,
# \"default_pool_size\": 15,
# \"users\": [
# {
# \"db_user\": \"postgres\",
# \"db_password\": \"postgres\",
# \"mode_type\": \"transaction\",
# \"pool_size\": 15,
# \"max_clients\": 200,
# \"pool_checkout_timeout\": 5000
# }
# ]
# }
# }"
# depends_on:
# supavisor:
# condition: service_healthy

minio:
image: minio/minio
ports:
- '9000:9000'
- '9001:9001'
- "9000:9000"
- "9001:9001"
networks:
default:
aliases:
Expand Down Expand Up @@ -149,7 +166,7 @@ services:
imgproxy:
image: darthsim/imgproxy
ports:
- '50020:8080'
- "50020:8080"
volumes:
- ${PWD}/data:${PWD}/data
environment:
Expand Down Expand Up @@ -177,25 +194,43 @@ services:
- CATALOG_IO__IMPL=org.apache.iceberg.aws.s3.S3FileIO
- CATALOG_S3_ENDPOINT=http://minio:9000

# Optional for rate-limiting
# redis:
# image: redis:6.2-alpine
# restart: always
# ports:
# - '6379:6379'
# Optional for rate-limiting
# redis:
# image: redis:6.2-alpine
# restart: always
# ports:
# - '6379:6379'

# Optional for tracing
otel:
profiles:
- monitoring
extends:
service: otel-collector
file: ./.docker/docker-compose-monitoring.yml

jaeger:
profiles:
- monitoring
extends:
service: jaeger
file: ./.docker/docker-compose-monitoring.yml

grafana:
profiles:
- monitoring
extends:
service: grafana
file: ./.docker/docker-compose-monitoring.yml

# Optional for tracing
# otel:
# extends:
# service: otel-collector
# file: ./.docker/docker-compose-monitoring.yml
#
# jaeger:
# extends:
# service: jaeger
# file: ./.docker/docker-compose-monitoring.yml
prometheus:
profiles:
- monitoring
extends:
service: prometheus
file: ./.docker/docker-compose-monitoring.yml

configs:
init.sql:
content: |
CREATE SCHEMA IF NOT EXISTS _supavisor;
CREATE SCHEMA IF NOT EXISTS _supavisor;
28 changes: 15 additions & 13 deletions .docker/docker-compose-monitoring.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ services:
image: prom/prometheus
container_name: prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- "--config.file=/etc/prometheus/prometheus.yml"
- "--web.enable-remote-write-receiver"
ports:
- 9090:9090
restart: unless-stopped
Expand All @@ -47,22 +48,23 @@ services:
jaeger:
image: jaegertracing/all-in-one:1.57.0
ports:
- "16686:16686" # Jaeger UI
- "14250:14250" # GRPC
- "14268:14268" # HTTP
- "14269:14269" # HTTP
- "6831:6831/udp" # UDP
- "6832:6832/udp" # UDP
- "5778:5778" # HTTP
- "16686:16686" # Jaeger UI
- "14250:14250" # GRPC
- "14268:14268" # HTTP
- "14269:14269" # HTTP
- "6831:6831/udp" # UDP
- "6832:6832/udp" # UDP
- "5778:5778" # HTTP

otel-collector:
image: otel/opentelemetry-collector-contrib:0.100.0
ports:
- "4317:4317" # OTLP gRPC receiver
- "4318:4318" # OTLP Http receiver
- "55680:55680" # OTLP HTTP receiver
command: [ "--config=/etc/otel/otel-collector-config.yml" ]
- "4317:4317" # OTLP gRPC receiver
- "4318:4318" # OTLP Http receiver
- "55680:55680" # OTLP HTTP receiver
- "9200:9200" # Prometheus metrics receiver
command: ["--config=/etc/otel/otel-collector-config.yml"]
depends_on:
- jaeger
volumes:
- ../monitoring/otel/config:/etc/otel
- ../monitoring/otel/config:/etc/otel
17 changes: 17 additions & 0 deletions .docker/pgbouncer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM edoburu/pgbouncer:v1.25.1-p0

USER root
RUN apk add --no-cache bash

COPY --chown=postgres:postgres pgbouncer.ini.template /etc/pgbouncer/pgbouncer.ini.template
COPY --chown=postgres:postgres entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

EXPOSE 6432

USER postgres

HEALTHCHECK --interval=10s --timeout=3s --start-period=5s --retries=3 \
CMD printf "SHOW VERSION;\n" | nc 127.0.0.1 6432 >/dev/null 2>&1 || exit 1

ENTRYPOINT ["/entrypoint.sh"]
Loading