Skip to content

Update self-hosting docs #1354

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
Sep 25, 2024
Merged

Update self-hosting docs #1354

merged 9 commits into from
Sep 25, 2024

Conversation

nicktrn
Copy link
Collaborator

@nicktrn nicktrn commented Sep 25, 2024

Adds a support and troubleshooting section. Documents auth and large payloads with the respective env vars. Also disables irrelevant PR checks when only making changes to docs.

Summary by CodeRabbit

  • New Features

    • Updated documentation for self-hosting Trigger.dev, clarifying setup processes and adding support information.
    • Introduced detailed instructions for two setup options: single server and split services.
  • Bug Fixes

    • Enhanced clarity in deployment steps, including new instructions for logging into the docker-provider container.
  • Documentation

    • Added sections on large payloads, version locking, and authentication options, including troubleshooting steps for deployment issues.
    • Specified that the guide is exclusively for Docker, with no Kubernetes documentation available.

Copy link

changeset-bot bot commented Sep 25, 2024

⚠️ No Changeset found

Latest commit: 092c3e6

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.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

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 Sep 25, 2024

Caution

Review failed

The pull request is closed.

Walkthrough

The pull request introduces modifications to the GitHub Actions workflow configuration and updates documentation for self-hosting Trigger.dev. It adds a paths-ignore directive to the workflow to prevent checks from triggering on changes solely within the docs/** directory. Additionally, the documentation has been enhanced to clarify the setup process, outline deployment options, and provide troubleshooting steps for users.

Changes

File Change Summary
.github/workflows/pr_checks.yml Added a paths-ignore directive to the pull_request event to ignore changes in the docs/** directory, preventing workflow checks from triggering for pull requests that only modify documentation files.
docs/open-source-self-hosting.mdx Updated documentation for self-hosting Trigger.dev, clarifying setup processes, detailing deployment options, and adding troubleshooting steps. Included specific instructions for Docker, outlined large payload handling, version locking, and authentication options, and renamed the checkpoint support section.

Possibly related PRs

  • GitHub workflow improvements #1306: This PR includes a feature to skip releases when only documentation changes are made, which relates to the addition of a paths-ignore directive for the docs/** directory in the workflow.
  • New Doc: create your own build extension reference #1347: This PR focuses on enhancing documentation related to build extensions, which may indirectly connect to the workflow changes affecting how documentation updates are handled in the CI/CD process.

Poem

In the meadow where bunnies play,
Changes come in a bright new way.
Docs now clearer, workflows refined,
Hopping forward, all aligned!
With Docker tips and troubles to share,
We celebrate progress, with joy in the air! 🐇✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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 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

🧹 Outside diff range and nitpick comments (8)
.github/workflows/pr_checks.yml (1)

6-7: Consider the implications of skipping all checks for documentation changes

The addition of paths-ignore for the docs/** directory aligns with the PR objective of streamlining the review process for documentation updates. However, this change has some potential drawbacks:

  1. It skips all checks defined in this workflow for documentation changes, which might include important checks that should run regardless of the changed files (e.g., linting for markdown files).
  2. There's no mechanism to selectively run certain checks for documentation changes.
  3. This might lead to reduced quality assurance for documentation changes if important checks are skipped.

Consider the following alternatives or improvements:

  1. Instead of ignoring all checks, create a separate job for documentation-specific checks (e.g., markdown linting, link checking) that runs only for changes in the docs/** directory.
  2. Use GitHub Actions' if conditions in individual jobs to selectively run or skip checks based on the changed files.
  3. Implement a matrix strategy to define which checks should run for different types of changes.

Example of selective job execution:

jobs:
  docs-check:
    if: ${{ contains(github.event.pull_request.files.*.path, 'docs/') }}
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Run markdown lint
        run: # Add your markdown linting command here

  other-checks:
    if: ${{ !contains(github.event.pull_request.files.*.path, 'docs/') }}
    # ... rest of your existing checks

This approach allows you to maintain quality checks for documentation while still optimizing the workflow for non-documentation changes.

docs/open-source-self-hosting.mdx (7)

6-7: Approved: Clear scope definition for the guide

This note effectively sets expectations for users by clarifying that the guide is specifically for Docker deployments. It's a valuable addition to prevent confusion.

Consider a minor grammatical improvement:

-<Note>This guide is for Docker only. We don't currently provide documentation for Kubernetes.</Note>
+<Note>This guide is for Docker only. We currently don't provide documentation for Kubernetes.</Note>

14-17: Approved: Clear overview of setup options

This overview effectively introduces the two alternative setup options, providing users with a clear understanding of their choices.

There's a minor grammatical issue in the first sentence. Consider this correction:

-The self-hosting guide covers two alternative setups. The first options uses a simple setup where you run everything on one server.
+The self-hosting guide covers two alternative setups. The first option uses a simple setup where you run everything on one server.
🧰 Tools
LanguageTool

[grammar] ~14-~14: Did you mean “options use” or “”?
Context: ...overs two alternative setups. The first options uses a simple setup where you run everything...

(NNS_USES)


170-178: Approved: Improved registry setup instructions

The updated instructions for logging into Docker Hub are more detailed and accurate. The addition of logging in the docker-provider container is crucial for ensuring smooth deployments.

For improved clarity, consider adding a brief explanation of why logging in the docker-provider container is necessary. For example:

4. Ensure the `docker-provider` container is logged in as well:
+   (This step is crucial for allowing the container to pull images during deployments)

234-287: Approved: Comprehensive coverage of additional features

The new Additional features section is a valuable addition to the documentation. It covers important topics such as handling large payloads, version locking, and authentication options. The explanations are clear and include helpful examples.

In the auth options subsection, consider adding a brief explanation of why GitHub OAuth is not recommended for self-hosted instances. This would provide users with more context for the warning. For example:

<Warning>Only enable GitHub auth if you understand the risks! We strongly advise you against this.</Warning>

+GitHub OAuth for self-hosted instances can potentially allow any GitHub user to access your instance, which may pose security risks.

Your GitHub OAuth app needs a callback URL `https://<your_domain>/auth/github/callback` and you will have to set the following env vars:
🧰 Tools
LanguageTool

[uncategorized] ~261-~261: The preposition ‘to’ seems more likely in this position.
Context: ...ell. By default, the images will point at the latest versioned release via the `v...

(AI_HYDRA_LEO_REPLACE_AT_TO)


[style] ~278-~278: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase.
Context: ...d_ for self-hosted instances. It's also very easy to lock yourself out of your own instan...

(EN_WEAK_ADJECTIVE)


Line range hint 289-301: Suggestion: Retain original section name and clarify checkpoint storage

The renaming of this section to "Troubleshooting" seems inconsistent with its content, which primarily focuses on checkpoint support. Consider keeping the original "Checkpoint support" title for clarity.

The added information about where checkpoints will be pushed is valuable. It helps users understand the storage mechanism for checkpoints.

Consider the following changes:

  1. Revert the section title to "Checkpoint support"
  2. Add a separate "Troubleshooting" section if needed for other issues
  3. Consider adding a brief explanation of why checkpoints are pushed to the registry, e.g., for consistency and ease of management

The added information about checkpoint storage is helpful and approved.

🧰 Tools
LanguageTool

[uncategorized] ~308-~308: Possible missing comma found.
Context: ... containers #### Setup Underneath the hood this uses Checkpoint and Restore in Use...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~308-~308: The preposition ‘for’ seems more likely in this position.
Context: ...s://github.com/checkpoint-restore/criu) in short. We'll have to do a few things to...

(AI_HYDRA_LEO_REPLACE_IN_FOR)


409-430: Approved: Helpful troubleshooting section added

The new Troubleshooting section is a valuable addition to the documentation. It addresses common issues that users might encounter, such as deployment failures and production run failures, providing clear and actionable solutions.

To improve clarity, consider adding brief explanations for why these issues might occur. For example:

- **Deployment fails at the push step.** The machine running `deploy` needs registry access:
+ **Deployment fails at the push step.** This often occurs when the machine running `deploy` lacks proper registry access. To resolve:

- **Prod runs fail to start.** The `docker-provider` needs registry access:
+ **Prod runs fail to start.** This typically happens when the `docker-provider` container doesn't have the necessary registry access. To fix:

Line range hint 433-522: Approved: Comprehensive CLI usage guide for self-hosted instances

The new CLI usage section is an excellent addition to the documentation. It covers important topics such as login, custom profiles, deployment, and CI/GitHub Actions usage, providing clear explanations and helpful examples for users working with self-hosted instances.

To make the section even more comprehensive, consider adding a brief subsection about troubleshooting common CLI issues in a self-hosted environment. This could include tips on debugging connection problems or authentication issues specific to self-hosted setups.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between c063dad and d69e382.

📒 Files selected for processing (2)
  • .github/workflows/pr_checks.yml (1 hunks)
  • docs/open-source-self-hosting.mdx (5 hunks)
🧰 Additional context used
LanguageTool
docs/open-source-self-hosting.mdx

[grammar] ~14-~14: Did you mean “options use” or “”?
Context: ...overs two alternative setups. The first options uses a simple setup where you run everything...

(NNS_USES)


[uncategorized] ~261-~261: The preposition ‘to’ seems more likely in this position.
Context: ...ell. By default, the images will point at the latest versioned release via the `v...

(AI_HYDRA_LEO_REPLACE_AT_TO)


[style] ~278-~278: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase.
Context: ...d_ for self-hosted instances. It's also very easy to lock yourself out of your own instan...

(EN_WEAK_ADJECTIVE)

🔇 Additional comments not posted (1)
docs/open-source-self-hosting.mdx (1)

18-21: Approved: Helpful support information added

The new Support section is a great addition. It provides users with a clear path to get assistance by joining the self-hosting channel on Discord. The playful reference adds a friendly touch to the documentation.

@nicktrn nicktrn merged commit 79624c1 into main Sep 25, 2024
2 of 10 checks passed
@nicktrn nicktrn deleted the self-hosting-docs-updates branch September 25, 2024 10:33
@coderabbitai coderabbitai bot mentioned this pull request Oct 14, 2024
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.

1 participant