-
Notifications
You must be signed in to change notification settings - Fork 0
fix(ci): stage non-root-readable local inputs #2514
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
Changes from all commits
3b3cc56
320c02b
090b9e6
6f566c0
d032680
9115407
c98bb1d
2a0ea3c
854fe68
b8f7e4e
4135ebd
dcbc416
64fcc21
f8a293d
115bc27
c1e411d
a13c3c7
d6b5b07
8e3ab50
d7d5e2f
fdc0a4d
865ad92
dd6ba96
d3bfccc
59b72c0
7d9f8a4
71f5ee4
a9f0a75
9cf5355
19fe208
96f024a
a44ac36
79031df
7a2d828
fc24d39
94b3ff2
b8d49c2
55d4d1e
5985274
f312986
a52e301
c984ae4
64390c0
39e801c
79cdbc9
eb7607c
838ff76
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -45,7 +45,7 @@ services: | |
| - "127.0.0.1:${KONG_HTTP_PORT}:8000/tcp" | ||
| - "127.0.0.1:${KONG_HTTPS_PORT}:8443/tcp" | ||
| volumes: !override | ||
| - "${LOCAL_INPUT_ROOT}/kong.yml:/home/kong/temp.yml:ro,z" | ||
| - "local-kong-config:/home/kong:Z" | ||
|
|
||
| auth: | ||
| container_name: !reset null | ||
|
|
@@ -74,7 +74,7 @@ services: | |
| functions: | ||
| container_name: !reset null | ||
| volumes: !override | ||
| - "${LOCAL_INPUT_ROOT}/functions:/home/deno/functions:ro,Z" | ||
| - "local-functions:/home/deno/functions:Z" | ||
|
|
||
| analytics: | ||
| container_name: !reset null | ||
|
|
@@ -84,34 +84,62 @@ services: | |
| db: | ||
| container_name: !reset null | ||
| volumes: !override | ||
| - "${LOCAL_INPUT_ROOT}/db-realtime.sql:/docker-entrypoint-initdb.d/migrations/99-realtime.sql:ro,z" | ||
| - "${LOCAL_INPUT_ROOT}/db-webhooks.sql:/docker-entrypoint-initdb.d/init-scripts/98-webhooks.sql:ro,z" | ||
| - "${LOCAL_INPUT_ROOT}/db-roles.sql:/docker-entrypoint-initdb.d/init-scripts/99-roles.sql:ro,z" | ||
| - "${LOCAL_INPUT_ROOT}/db-jwt.sql:/docker-entrypoint-initdb.d/init-scripts/99-jwt.sql:ro,z" | ||
| - "local-db-init-migrations:/docker-entrypoint-initdb.d/migrations:Z" | ||
| - "local-db-init-scripts:/docker-entrypoint-initdb.d/init-scripts:Z" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Mounting a fresh named volume over the entire AGENTS.md reference: AGENTS.md:L80-L80 Useful? React with 👍 / 👎. |
||
| - "local-db-data:/var/lib/postgresql/data:Z" | ||
| - "${LOCAL_INPUT_ROOT}/db-supabase.sql:/docker-entrypoint-initdb.d/migrations/97-_supabase.sql:ro,z" | ||
| - "${LOCAL_INPUT_ROOT}/db-logs.sql:/docker-entrypoint-initdb.d/migrations/99-logs.sql:ro,z" | ||
| - "${LOCAL_INPUT_ROOT}/db-pooler.sql:/docker-entrypoint-initdb.d/migrations/99-pooler.sql:ro,z" | ||
| - "local-db-config:/etc/postgresql-custom" | ||
|
|
||
| vector: | ||
| container_name: !reset null | ||
| volumes: !override | ||
| - "${LOCAL_INPUT_ROOT}/vector.yml:/etc/vector/vector.yml:ro,z" | ||
| - "local-vector-config:/etc/vector:Z" | ||
|
|
||
| supavisor: | ||
| container_name: !reset null | ||
| # GitHub-hosted Docker denies Tini's subreaper setup; the image's limits | ||
| # wrapper preserves bounded startup without requiring that capability. | ||
| entrypoint: ["/app/limits.sh"] | ||
| environment: !override | ||
| PORT: 4000 | ||
| POSTGRES_PORT: ${POSTGRES_PORT} | ||
| POSTGRES_DB: ${POSTGRES_DB} | ||
| POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} | ||
| DATABASE_URL: ecto://supabase_admin:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/_supabase | ||
| SECRET_KEY_BASE: ${SECRET_KEY_BASE} | ||
| VAULT_ENC_KEY: ${VAULT_ENC_KEY} | ||
| API_JWT_SECRET: ${JWT_SECRET} | ||
| METRICS_JWT_SECRET: ${JWT_SECRET} | ||
| REGION: local | ||
| ERL_AFLAGS: "" | ||
| RLIMIT_NOFILE: "" | ||
| POOLER_TENANT_ID: ${POOLER_TENANT_ID} | ||
| POOLER_DEFAULT_POOL_SIZE: ${POOLER_DEFAULT_POOL_SIZE} | ||
| POOLER_MAX_CLIENT_CONN: ${POOLER_MAX_CLIENT_CONN} | ||
| POOLER_POOL_MODE: transaction | ||
| DB_POOL_SIZE: ${POOLER_DB_POOL_SIZE} | ||
| ports: !override | ||
| # POSTGRES_PORT remains the internal 5432 listener; only the host mapping is derived. | ||
| - "127.0.0.1:${POSTGRES_HOST_PORT}:5432/tcp" | ||
| - "127.0.0.1:${POOLER_PROXY_PORT_TRANSACTION}:6543/tcp" | ||
| volumes: !override | ||
| - "${LOCAL_INPUT_ROOT}/pooler.exs:/etc/pooler/pooler.exs:ro,z" | ||
| - "local-pooler-config:/etc/pooler:Z" | ||
|
|
||
| volumes: !override | ||
| local-db-data: | ||
| name: "${PROJECT_NAME}-db-data" | ||
| local-db-init-migrations: | ||
| name: "${PROJECT_NAME}-db-init-migrations" | ||
| local-db-init-scripts: | ||
| name: "${PROJECT_NAME}-db-init-scripts" | ||
| local-db-config: | ||
| name: "${PROJECT_NAME}-db-config" | ||
| local-functions: | ||
| name: "${PROJECT_NAME}-functions" | ||
| local-kong-config: | ||
| name: "${PROJECT_NAME}-kong-config" | ||
| local-pooler-config: | ||
| name: "${PROJECT_NAME}-pooler-config" | ||
| local-storage-data: | ||
| name: "${PROJECT_NAME}-storage-data" | ||
| local-vector-config: | ||
| name: "${PROJECT_NAME}-vector-config" | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new database-init volumes are mounted read-write, but after
_stage_input_filescopies the source-bound SQL, subsequent readiness and runtime admission verify only service health and volume identities—not the hashes or modes of the files actually mounted in the container. If database startup or another volume consumer alters a staged file, the stack can still emit receipts claiming the checkout provenance while executing different bytes. Mount staged inputs read-only where possible, or read back and hash each staged destination before accepting the stack.AGENTS.md reference: AGENTS.md:L80-L80
Useful? React with 👍 / 👎.