Skip to content

Commit 68e5f96

Browse files
committed
docs: simplify self-hosting deploy docs
- Remove hidden CLI flags from docs (--load, --push, --network) - Clarify that v4 self-hosted builds are local by default - Remove deprecated --self-hosted flag from examples - Reference GitHub Actions guide for CI setup - Simplify GitHub Actions self-hosting example Fixes #2835
1 parent 76333b9 commit 68e5f96

File tree

2 files changed

+10
-59
lines changed

2 files changed

+10
-59
lines changed

docs/github-actions.mdx

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -134,16 +134,11 @@ You should use the version you run locally during dev and manual deploy. The cur
134134

135135
## Self-hosting
136136

137-
When self-hosting, you will have to take a few additional steps:
137+
When self-hosting, you need to:
138138

139-
- Specify the `TRIGGER_API_URL` environment variable. You can add it to the GitHub secrets the same way as the access token. This should point at your webapp domain, for example: `https://trigger.example.com`
140-
- Setup docker as you will need to build and push the image to your registry. On [Trigger.dev Cloud](https://cloud.trigger.dev) this is all done remotely.
139+
- Set up Docker Buildx in your CI environment for building images locally.
141140
- Add your registry credentials to the GitHub secrets.
142-
- Use the `--self-hosted` and `--push` flags when deploying.
143-
144-
<Tip>If you're self-hosting v4, the `--self-hosted` and `--push` flags are **NOT** needed.</Tip>
145-
146-
Other than that, your GitHub action file will look very similar to the one above:
141+
- Specify the `TRIGGER_API_URL` environment variable pointing to your webapp domain, for example: `https://trigger.example.com`
147142

148143
<CodeGroup>
149144

@@ -170,13 +165,11 @@ jobs:
170165
- name: Install dependencies
171166
run: npm install
172167
173-
# docker setup - part 1
174168
- name: Set up Docker Buildx
175169
uses: docker/setup-buildx-action@v3
176170
with:
177171
version: latest
178172
179-
# docker setup - part 2
180173
- name: Login to DockerHub
181174
uses: docker/login-action@v3
182175
with:
@@ -186,11 +179,9 @@ jobs:
186179
- name: 🚀 Deploy Trigger.dev
187180
env:
188181
TRIGGER_ACCESS_TOKEN: ${{ secrets.TRIGGER_ACCESS_TOKEN }}
189-
# required when self-hosting
190182
TRIGGER_API_URL: ${{ secrets.TRIGGER_API_URL }}
191-
# deploy with additional flags
192183
run: |
193-
npx trigger.dev@latest deploy --self-hosted --push
184+
npx trigger.dev@latest deploy
194185
```
195186

196187
</CodeGroup>

docs/snippets/cli-commands-deploy.mdx

Lines changed: 6 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -85,54 +85,14 @@ These options are available on most commands.
8585

8686
### Self-hosting
8787

88-
These options are used when [self-hosting](/open-source-self-hosting) or for local development.
89-
90-
<ParamField body="Local build" type="--local-build">
91-
Build the deployment image locally using your local Docker instead of using the remote build service.
92-
</ParamField>
93-
94-
<ParamField body="Load image" type="--load">
95-
Load the built image into your local Docker after building it.
96-
</ParamField>
97-
98-
<ParamField body="Push image" type="--push">
99-
Push the image to the registry after building locally.
100-
</ParamField>
101-
102-
<ParamField body="Network" type="--network">
103-
The networking mode for RUN instructions when building locally. Options: `default`, `none`, `host`.
104-
</ParamField>
105-
106-
<ParamField body="Native build server" type="--native-build-server">
107-
Use the native build server for building the image. This uploads your project files and builds remotely.
108-
</ParamField>
109-
110-
<ParamField body="Detach" type="--detach">
111-
Return immediately after the deployment is queued, without waiting for the build to complete. Implies `--native-build-server`.
112-
</ParamField>
113-
114-
## Examples
115-
116-
### Self-hosted deployment
117-
118-
For self-hosted deployments, set your `TRIGGER_ACCESS_TOKEN` and use the `--api-url` option to point to your self-hosted instance:
88+
When [self-hosting](/open-source-self-hosting), builds are performed locally by default. Set the `TRIGGER_ACCESS_TOKEN` environment variable and point to your self-hosted instance using `TRIGGER_API_URL` or `--api-url`:
11989

12090
```bash
121-
TRIGGER_ACCESS_TOKEN=your_token npx trigger.dev@latest deploy --api-url https://your-trigger-instance.com
91+
TRIGGER_ACCESS_TOKEN=your_token TRIGGER_API_URL=https://your-trigger-instance.com npx trigger.dev@latest deploy
12292
```
12393

124-
### Local build with Docker
125-
126-
Build the image locally and load it into your local Docker:
127-
128-
```bash
129-
npx trigger.dev@latest deploy --local-build --load
130-
```
94+
For CI/CD setup with self-hosting, see the [GitHub Actions guide](/github-actions#self-hosting).
13195

132-
### Local build and push to registry
133-
134-
Build the image locally and push it to your configured registry:
135-
136-
```bash
137-
npx trigger.dev@latest deploy --local-build --push
138-
```
96+
<ParamField body="Local build" type="--local-build">
97+
Force building the deployment image locally using your local Docker. This is automatic when self-hosting.
98+
</ParamField>

0 commit comments

Comments
 (0)