-
-
Notifications
You must be signed in to change notification settings - Fork 724
Docs improvements for v4 self hosting #2156
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
Conversation
|
WalkthroughThe changes introduce a new CLI command documentation page for 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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (2)
docs/cli-switch.mdx (1)
8-16
: Remove unused imports.Several snippet imports (
ProjectPathArg
,CommonOptions
,ProjectRefOption
,EnvFileOption
,ConfigFileOption
,SkipUpdateCheckOption
,BranchOption
) are not referenced in this document. Consider removing them to avoid confusion.docs/self-hosting/docker.mdx (1)
50-50
: Minor wording: “all of the runs” → “all runs”
Consider dropping “of” for conciseness:- This machine will host the supervisor and all of the runs. + This machine will host the supervisor and all runs.🧰 Tools
🪛 LanguageTool
[style] ~50-~50: Consider removing “of” to be more concise
Context: ...is machine will host the supervisor and all of the runs. - 2+ vCPU - 4+ GB RAM How many ...(ALL_OF_THE)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
docs/cli-switch.mdx
(1 hunks)docs/docs.json
(1 hunks)docs/self-hosting/docker.mdx
(7 hunks)docs/self-hosting/env/webapp.mdx
(1 hunks)hosting/docker/.env.example
(2 hunks)hosting/docker/webapp/docker-compose.yml
(3 hunks)hosting/docker/worker/docker-compose.yml
(3 hunks)
🧰 Additional context used
🧠 Learnings (1)
hosting/docker/.env.example (1)
Learnt from: nicktrn
PR: triggerdotdev/trigger.dev#2155
File: hosting/docker/.env.example:4-7
Timestamp: 2025-06-06T23:55:01.894Z
Learning: In the trigger.dev project, .env.example files should contain actual example secret values rather than placeholders, as these help users understand the expected format. The files include clear warnings about not using these defaults in production and instructions for generating proper secrets.
🪛 Checkov (3.2.334)
hosting/docker/webapp/docker-compose.yml
[MEDIUM] 32-33: Basic Auth Credentials
(CKV_SECRET_4)
🪛 LanguageTool
docs/self-hosting/docker.mdx
[uncategorized] ~24-~24: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...eploy and execute tasks without needing third party services for this. - **Improved CLI com...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
[style] ~50-~50: Consider removing “of” to be more concise
Context: ...is machine will host the supervisor and all of the runs. - 2+ vCPU - 4+ GB RAM How many ...
(ALL_OF_THE)
[misspelling] ~217-~217: Did you mean the verb “log in” instead of the noun ‘login’?
Context: ...g, builds run locally. You will have to login to the registry on every machine that r...
(LOG_IN)
[locale-violation] ~223-~223: In American English, ‘afterward’ is the preferred variant. ‘Afterwards’ is more commonly used in British English and other dialects.
Context: ...``` This will prompt for the password. Afterwards, the deploy command should work as expe...
(AFTERWARDS_US)
[grammar] ~223-~223: The word ‘deploy’ is a verb. Did you mean the noun “deployment” (= release, placement)?
Context: ...rompt for the password. Afterwards, the deploy command should work as expected. ## Ob...
(PREPOSITION_VERB)
[uncategorized] ~311-~311: Possible missing comma found.
Context: ....com" ``` This will apply to all auth methods including magic link and GitHub OAuth. ...
(AI_HYDRA_LEO_MISSING_COMMA)
🪛 Gitleaks (8.26.0)
docs/self-hosting/docker.mdx
177-178: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
181-181: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
⏰ Context from checks skipped due to timeout of 90000ms (25)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (10, 10)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (9, 10)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (8, 10)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (7, 10)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (6, 10)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (8, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (5, 10)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (7, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (4, 10)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (6, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (3, 10)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (5, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (2, 10)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (4, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (1, 10)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (3, 8)
- GitHub Check: units / packages / 🧪 Unit Tests: Packages (1, 1)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (2, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (1, 8)
- GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - pnpm)
- GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - npm)
- GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - pnpm)
- GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - npm)
- GitHub Check: typecheck / typecheck
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (41)
docs/self-hosting/env/webapp.mdx (1)
129-129
: Well-defined default memory allocation.The addition of
NODE_MAX_OLD_SPACE_SIZE
with a clear MiB unit is helpful for users to understand and configure Node.js memory.hosting/docker/worker/docker-compose.yml (4)
5-5
: Unified image tag variable.Switching from
SUPERVISOR_IMAGE_TAG
toTRIGGER_IMAGE_TAG
ensures consistency across services for image versioning.
12-12
: Includewebapp
network.Adding the
webapp
network to the supervisor service aligns with the updated networking topology and enables direct communication.
22-23
: Explicit worker token path.Using
file:///home/node/shared/worker_token
makes the source of the token clear and matches the documentation for bootstrap token creation.
77-78
: Declarewebapp
network.Defining the
webapp
network at the bottom ensures Docker Compose recognizes and creates it for all services.docs/docs.json (1)
143-153
: Update CLI commands navigation order.Reordering
cli-dev-commands
beforecli-init-commands
and appending new entries (cli-login-commands
,cli-logout-commands
,cli-preview-archive
,cli-promote-commands
,cli-switch
,cli-update-commands
,cli-whoami-commands
) correctly integrates the newswitch
command into the CLI section.docs/cli-switch.mdx (3)
1-6
: Frontmatter metadata looks good.The title, sidebarTitle, description, and tag align with the format of other CLI command pages.
19-35
: Usage examples are clear.The CodeGroup usage section correctly demonstrates how to run the
switch
command with npm, pnpm, and yarn.
39-47
: Arguments section is concise.The
profile
argument is well-explained; omitting the profile will list options interactively.hosting/docker/webapp/docker-compose.yml (3)
5-5
: Unified image tag variable.Switching to
TRIGGER_IMAGE_TAG
for thewebapp
service aligns with other services and the.env.example
.
30-30
: ExposeAPI_ORIGIN
.Making
API_ORIGIN
configurable with an override enhances flexibility for different deployment scenarios.
32-33
: Default database connection strings.Providing fallback values for
DATABASE_URL
andDIRECT_URL
simplifies local setups; ensure the SSL mode setting is appropriate for production deployments.
Verification: Confirm ifsslmode=disable
is acceptable in production or if a secure default is needed.🧰 Tools
🪛 Checkov (3.2.334)
[MEDIUM] 32-33: Basic Auth Credentials
(CKV_SECRET_4)
docs/self-hosting/docker.mdx (17)
17-18
: Clear “What’s new” bullets for v4 features
The new items on simpler setup and automatic container cleanup are concise and informative.
23-25
: “What’s new” entries for checkpoint support and CLI switch
The notes on removing checkpoint support and highlighting the newswitch
command fit well here.🧰 Tools
🪛 LanguageTool
[uncategorized] ~24-~24: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...eploy and execute tasks without needing third party services for this. - **Improved CLI com...(EN_COMPOUND_ADJECTIVE_INTERNAL)
43-43
: Clarify webapp host requirements
The description for the webapp host machine is accurate and aligns with the updated architecture.
90-93
: Step 4: Reapply compose after env changes
Good call to remind users to rundocker compose up -d
after editing.env
.
96-99
: Step 5: Access and log retrieval instructions
Instructions to check logs for the magic link are clear.
102-102
: Step 6 (optional): Project initialization command
Thenpx trigger.dev@v4-beta init
example is helpful for getting started.
108-112
: Bonus: Traefik reverse proxy commented example
Including a commented example for Traefik is a nice-to-have and clearly marked optional.
136-138
: Worker setup: env configuration and apply changes
The supervisor env var section matches the compose updates and is well explained.
144-144
: Step 6: Scale additional workers
Clear instruction to repeat for more workers.
152-152
: Combined stack compose command
Good inclusion of the combineddocker compose -f ... up -d
example.
156-160
: Combined stack Traefik override commented
Optional Traefik override is properly scoped and commented out.
163-164
: Worker token section header and intro
The new “Worker token” header and explanation align with the actual bootstrap flow.
189-191
: Instructions to set and restart worker token
The guidance on uncommentingTRIGGER_WORKER_TOKEN
and restarting is clear.
331-336
: Troubleshooting: log inspection snippet
The log command example is precise and correctly scoped.
344-344
: CLI usage: “Login” heading
The added “Login” subsection clarifies the first CLI step.🧰 Tools
🪛 LanguageTool
[style] ~344-~344: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...ud.trigger.dev) when using the CLI, you need to specify the URL of your self-hosted ins...(REP_NEED_TO_VB)
352-352
: CLI usage: “Profiles” heading
The new “Profiles” section landing spot is consistent with the navigation.
391-391
: CLI usage: “Whoami” heading
Adding a “Whoami” subsection helps users verify their login context.hosting/docker/.env.example (12)
1-5
: Header comments clearly set expectations
The top block introduces the file’s purpose and links to docs—perfect for first-time users.
14-20
: Worker token placeholders and guidance
Worker token instructions align with the updated bootstrap flow and link back to the docs.
21-29
: Postgres defaults with clear production warnings
Credentials and URLs are spelled out with appropriate “do not use in production” notes.
30-34
: UnifiedTRIGGER_IMAGE_TAG
guidance
The single image tag variable replaces separate tags and includes version-locking advice.
36-43
: Webapp origin variables introduced
APP_ORIGIN
,LOGIN_ORIGIN
, andAPI_ORIGIN
are configured with sensible defaults.
44-53
: Node.js memory management section comprehensive
Heap size recommendations and examples are thorough and clear.
55-62
: Docker registry defaults and notes
Registry URL and credentials are documented with production considerations.
64-75
: Minio object store example configuration
Access keys, dashboard notes, and bucket instructions are well covered.
76-87
: Other service image tags section
Encourages locking all service image tags, matching best practices.
88-98
: Publish IPs section for binding control
Examples for local vs production binding are helpful.
100-103
: Restart policy template included
Restart policy default commented out with clear commentary.
104-110
: Traefik reverse proxy example settings
Traefik env vars are presented as examples with a pointer to override files.
This also documents the new
switch
command.