Skip to content

hotfix(global): improve self-hosted docker startup - #56

Open
joaomnuno wants to merge 5 commits into
open-condo-software:mainfrom
joaomnuno:joaomnuno/dokku-self-hosting-fixes
Open

hotfix(global): improve self-hosted docker startup#56
joaomnuno wants to merge 5 commits into
open-condo-software:mainfrom
joaomnuno:joaomnuno/dokku-self-hosting-fixes

Conversation

@joaomnuno

Copy link
Copy Markdown

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 fetchMore typing 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...HEAD
  • yarn 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 --noEmit

I also tried yarn workspace @open-condo/files build, but this checkout has root-owned files in packages/files/dist, so rimraf dist fails with EACCES before TypeScript runs. The no-emit TypeScript check above covers the changed @open-condo/files source.

By opening this PR I agree to the contributor license terms in docs/contributing.md.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread Dockerfile
USER app:app
WORKDIR /app
COPY --from=builder --chown=app:app /app /app
CMD ["bash", "-lc", "yarn workspace @app/condo start"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant