Skip to content

Commit 47bed15

Browse files
nicktrnclaude
andauthored
docs: fix self-hosting section in deploy docs (#2836)
Fixes #2835 There were still some flags in here we removed, deploying is a lot simpler now for self-hosters. Also updates the github actions guide. --------- Co-authored-by: Claude <[email protected]>
1 parent 752ad32 commit 47bed15

File tree

2 files changed

+12
-57
lines changed

2 files changed

+12
-57
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: 8 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ npx trigger.dev@latest deploy [path]
7777
Turn off syncing environment variables with the Trigger.dev instance.
7878
</ParamField>
7979

80+
<ParamField body="Local build" type="--local-build">
81+
Force building the deployment image locally using your local Docker. This is automatic when self-hosting.
82+
</ParamField>
83+
8084
### Common options
8185

8286
These options are available on most commands.
@@ -85,50 +89,10 @@ These options are available on most commands.
8589

8690
### Self-hosting
8791

88-
These options are typically used when [self-hosting](/open-source-self-hosting) or for local development.
89-
90-
<ParamField body="Self-hosted (builds locally)" type="--self-hosted">
91-
Builds and loads the image using your local docker. Use the `--registry` option to specify the
92-
registry to push the image to when using `--self-hosted`, or just use `--push` to push to the
93-
default registry.
94-
</ParamField>
95-
96-
<ParamField body="Skip deploying the image" type="--skip-deploy | -D">
97-
Load the built image into your local docker.
98-
</ParamField>
99-
100-
<ParamField body="Load image" type="--load-image">
101-
Loads the image into your local docker after building it.
102-
</ParamField>
103-
104-
<ParamField body="Registry" type="--registry">
105-
Specify the registry to push the image to when using `--self-hosted`. Will automatically enable
106-
`--push`.
107-
</ParamField>
108-
109-
<ParamField body="Push image" type="--push">
110-
When using the `--self-hosted` flag, push the image to the registry.
111-
</ParamField>
112-
113-
<ParamField body="Namespace" type="--namespace">
114-
The namespace to use when pushing the image to the registry. For example, if pushing to Docker
115-
Hub, the namespace is your Docker Hub username.
116-
</ParamField>
117-
118-
<ParamField body="Network" type="--network">
119-
The networking mode for RUN instructions when using `--self-hosted`.
120-
</ParamField>
121-
122-
## Examples
123-
124-
### Push to Docker Hub (self-hosted)
125-
126-
An example of deploying to Docker Hub when using a self-hosted setup:
92+
When [self-hosting](/self-hosting/overview), builds are performed locally by default. Once you've logged in to your self-hosted instance using the CLI, you can deploy with:
12793

12894
```bash
129-
npx trigger.dev@latest deploy \
130-
--self-hosted \
131-
--load-image \
132-
--registry docker.io \
133-
--namespace mydockerhubusername
95+
npx trigger.dev@latest deploy
13496
```
97+
98+
For CI/CD environments, set `TRIGGER_ACCESS_TOKEN` and `TRIGGER_API_URL` environment variables. See the [GitHub Actions guide](/github-actions#self-hosting) for more details.

0 commit comments

Comments
 (0)