Skip to content

Docker self-hosting improvements #2177

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

Merged
merged 9 commits into from
Jun 16, 2025
Merged

Docker self-hosting improvements #2177

merged 9 commits into from
Jun 16, 2025

Conversation

nicktrn
Copy link
Collaborator

@nicktrn nicktrn commented Jun 16, 2025

A lot of settings now more easily configurable by editing .env file only. The default logging driver settings will now prevent excessive disk usage. Min worker specs have been raised after user feedback.

Copy link

changeset-bot bot commented Jun 16, 2025

⚠️ No Changeset found

Latest commit: 39bc640

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

coderabbitai bot commented Jun 16, 2025

Walkthrough

The changes update documentation and configuration files related to Docker-based self-hosting. The minimum hardware requirements for the worker machine are increased, and git clone commands in setup instructions are updated to use shallow clones. A note is added regarding modifying the default registry authentication file before production deployment. The .env.example file receives new environment variable placeholders, refined documentation links, and a new section for Docker logging configuration. Both the webapp and worker Docker Compose files introduce reusable logging configuration anchors, which are applied to all major services. Several environment variables are modified to support overrides via environment variables with default fallbacks.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
hosting/docker/webapp/docker-compose.yml (1)

207-207: Add newline at EOF
YAML files should end with a newline to satisfy linters.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5f6fd8e and 39bc640.

📒 Files selected for processing (4)
  • docs/self-hosting/docker.mdx (4 hunks)
  • hosting/docker/.env.example (5 hunks)
  • hosting/docker/webapp/docker-compose.yml (9 hunks)
  • hosting/docker/worker/docker-compose.yml (3 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
hosting/docker/webapp/docker-compose.yml

[error] 207-207: no new line character at the end of file

(new-line-at-end-of-file)

🪛 dotenv-linter (3.3.0)
hosting/docker/.env.example

[warning] 46-46: [UnorderedKey] The DEV_OTEL_EXPORTER_OTLP_ENDPOINT key should go before the LOGIN_ORIGIN key


[warning] 67-67: [UnorderedKey] The DOCKER_REGISTRY_PASSWORD key should go before the DOCKER_REGISTRY_URL key

⏰ Context from checks skipped due to timeout of 90000ms (25)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (6, 10)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (8, 10)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (7, 10)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (7, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (10, 10)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (5, 10)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (9, 10)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (3, 10)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (2, 10)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (4, 10)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (8, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (5, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (1, 10)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (4, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (6, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (3, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (2, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (1, 8)
  • GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - npm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - pnpm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - pnpm)
  • GitHub Check: units / packages / 🧪 Unit Tests: Packages (1, 1)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - npm)
  • GitHub Check: typecheck / typecheck
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (17)
docs/self-hosting/docker.mdx (3)

52-53: Updated worker minimum specs
Minimum requirements increased to 4+ vCPU and 8+ GB RAM. This aligns with performance improvements and user feedback on resource needs.


73-73: Shallow clone for faster setup
Adding --depth=1 optimizes cloning speed and reduces disk usage.


215-215: Production registry auth caution
Highlighting the need to update the default .htpasswd file before prod is essential to prevent insecure defaults.

hosting/docker/worker/docker-compose.yml (4)

3-8: Introduce reusable logging config anchor
Defining x-logging allows centralized control of log driver settings and aligns with .env fallback variables.


14-14: Apply logging anchor to supervisor service
Ensures supervisor logs respect configured driver and rotation settings.


33-34: Make API and OTLP endpoints configurable
Switching to ${...:-default} patterns supports overrides for split deployments.


57-57: Apply logging anchor to docker-proxy service
Consistent logging configuration across proxy service to prevent unbounded log growth.

hosting/docker/webapp/docker-compose.yml (4)

3-8: Introduce reusable logging config anchor
Centralizes log rotation settings with environment fallbacks. Good consistency with worker setup.


14-14: Apply logging anchor to all services
Ensures uniform log driver and size/file limits across webapp, databases, and storage services.

Also applies to: 72-72, 96-96, 113-113, 132-132, 153-153, 175-175


50-50: Add DEV_OTEL_EXPORTER_OTLP_ENDPOINT override
Allows custom OTLP endpoint for development telemetry with sensible default.


119-119: Externalize Electric service DATABASE_URL
Switches to ${DATABASE_URL:-…} for consistency and environment-based overrides.

hosting/docker/.env.example (6)

21-24: Add placeholders for Worker URLs
Providing TRIGGER_API_URL and OTEL_EXPORTER_OTLP_ENDPOINT improves clarity for split setups.


37-37: Refine example TRIGGER_IMAGE_TAG
Using a specific example tag (v4.0.0-v4-beta.21) demonstrates locking best practices.


46-46: Add DEV_OTEL_EXPORTER_OTLP_ENDPOINT to example env
Complements webapp compose changes for telemetry endpoint configuration.


64-64: Update registry docs link anchor
Pointing directly to #registry-setup improves navigation to relevant section.


71-71: Update object storage docs link anchor
Direct link to #object-storage streamlines setup reference.


110-115: Add Docker logging configuration examples
Commented variables guide customization of log driver, rotation size, and compression.

@nicktrn nicktrn merged commit f7f8bc2 into main Jun 16, 2025
34 checks passed
@nicktrn nicktrn deleted the self-hosting-improvements branch June 16, 2025 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants