feat(standalone): configurable file-size limits + Postgres schema bootstrap - #301
Closed
ckbaker10 wants to merge 2 commits into
Closed
feat(standalone): configurable file-size limits + Postgres schema bootstrap#301ckbaker10 wants to merge 2 commits into
ckbaker10 wants to merge 2 commits into
Conversation
ckbaker10
force-pushed
the
feat-file-size
branch
from
July 27, 2026 14:47
0762acf to
522ddc7
Compare
Signed-off-by: ckbkr <56784875+ckbaker10@users.noreply.github.com> Assisted-by: ClaudeCode:claude-sonnet-5
Signed-off-by: ckbkr <56784875+ckbaker10@users.noreply.github.com> Assisted-by: ClaudeCode:claude-sonnet-5
ckbaker10
force-pushed
the
feat-file-size
branch
from
July 27, 2026 14:52
522ddc7 to
bcbdebc
Compare
chrip
self-requested a review
July 27, 2026 19:19
chrip
requested changes
Jul 27, 2026
chrip
left a comment
Contributor
There was a problem hiding this comment.
Thanks @ckbaker10! Requesting changes — nothing wrong with the code itself: the schema-bootstrap half is genuinely good and approvable on its own, and I found no correctness bug in the paths I could verify statically. Two things before merge, though:
- It collides with #237, which is still open and touches the same
build/scripts/standalone/entrypoint.shfor the same settings (.FileConverter.converter.maxDownloadBytesand the zipinputLimits) under different env-var names and a different mechanism. Merging both would conflict and leave two competing controls for one setting. - It bundles an unrelated concern — the size limits and the Postgres schema bootstrap are two separate changes sharing a file.
Could you split out ensure_db_schema into its own PR (I'd merge that quickly), and reconcile the size-limit half with #237 — one env-var scheme and one mechanism per setting? Happy to help align the naming.
Assisted-by: ClaudeCode:claude-opus-4-8
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Two unrelated gaps in
build/scripts/standalone/entrypoint.sh, bundled here because they touchthe same file:
limits_tempfile_upload,maxDownloadBytes, the twoinputLimits[].zip.uncompressedvalues, nginx'sclient_max_body_size) are hardcoded. Raisingthem today means
sed-patching files inside a running container, which isn't under anydocumented volume — the edit is gone on next
docker run/recreate.DB table "task_result" does not existand never binding
:8000, so nginx serves 502 on/healthcheckuntil someone applies theschema by hand.
Approach
Size limits — four new env vars, defaults match current shipped values (unset = no behavior
change):
MAX_FILE_SIZE104857600services.CoAuthoring.server.limits_tempfile_upload,FileConverter.converter.maxDownloadBytes(local.json), example app'smaxFileSizeMAX_ZIP_UNCOMPRESSED_DOC50MBinputLimits[].zip.uncompressedfor docx/pptx/vsdxMAX_ZIP_UNCOMPRESSED_XLSX300MBNGINX_CLIENT_MAX_BODY_SIZE100mclient_max_body_sizeinds-common.confinputLimitsgets patched withseddirectly ondefault.jsonrather than merged intolocal.json— node-config replaces arrays wholesale instead of merging by element, which wouldsilently drop the
templatefield from every entry.ds-example.confneeds no change, it has noclient_max_body_sizeof its own and inherits fromds-common.conf's scope.Schema bootstrap —
ensure_db_schema(), called afterservice postgresql start: waits forPostgres, checks for the
task_resulttable, appliesserver/schema/postgresql/createdb.sqlifmissing. No-op on an already-initialized DB.
Testing
server/Common/config/default.json's actualschema: numeric coercion and per-family zip-limit targeting both correct.
client_max_body_sizeinds-common.confactually gets patched and nginx accepts the largerbody size.
/example/succeeds end-to-end.ensure_db_schemacreates the schema on first boot, docservice comesup healthy instead of 502-ing on
/healthcheck.AI disclosure
Drafted with AI assistance (Claude Code / Sonnet 5) per the repo's AI Contribution Policy.