hotfix(global): improve self-hosted docker startup - #56
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c2f1e92273
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| USER app:app | ||
| WORKDIR /app | ||
| COPY --from=builder --chown=app:app /app /app | ||
| CMD ["bash", "-lc", "yarn workspace @app/condo start"] |
There was a problem hiding this comment.
Preserve signal delivery for the default server command
When this image is stopped by Docker/Kubernetes, SIGTERM is sent only to PID 1. With this bash -lc wrapper, bash exits without forwarding the signal to the yarn/Node child, so the SIGTERM handler installed by setupGracefulShutdown in bin/run-keystone-app.js does not run; production deploys can skip draining and close in-flight requests abruptly. Use a command that replaces the shell, or start the server process as PID 1.
Useful? React with 👍 / 👎.
I hit these while getting a self-hosted/Dokku deployment running from this repository. They are small fixes, but together they remove a few rough edges from the default Docker path and file upload flow.
The Docker image now has an explicit default command for the Condo app, so a built image can start without passing the command manually. File uploads now pass ArrayBuffer slices into File/Blob when the source is a Node Buffer or converted media buffer; that avoids leaking the full backing buffer into the upload payload. I also pinned the TypeScript compiler version used by the workspace, kept generated
fetchMoretyping compatible with the current Apollo types, and added keys to the tour guide text fragments to avoid React list warnings.I checked this with:
git diff --check upstream/main...HEADyarn eslint packages/files/src/client.ts packages/codegen/generate.hooks.ts apps/condo/domains/news/components/FilesUploadList/utils/fileConversion.ts apps/condo/pages/tour/guide.tsx(no errors, existing warnings only)yarn tsc -p packages/files/tsconfig.json --noEmitI also tried
yarn workspace @open-condo/files build, but this checkout has root-owned files inpackages/files/dist, sorimraf distfails withEACCESbefore TypeScript runs. The no-emit TypeScript check above covers the changed@open-condo/filessource.By opening this PR I agree to the contributor license terms in
docs/contributing.md.