Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/self-hosting/docker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,8 @@ TRIGGER_IMAGE_TAG=v4.5.0

We patch the latest released version line only, so keep an eye on new releases to receive security fixes. See [Security & vulnerability reporting](/self-hosting/security).

You can also lock the versions of the bundled services, for example with `CLICKHOUSE_IMAGE_TAG`. If you do, or if you bring your own ClickHouse via `CLICKHOUSE_URL`, note that Trigger.dev requires ClickHouse 25.8 or newer.

<Note>
Trigger.dev 4.5.0 is the last version we officially support for running v3 (SDK v3) tasks. If
you still have v3 tasks, pin `TRIGGER_IMAGE_TAG` to exactly `v4.5.0` or [migrate to
Expand Down
14 changes: 12 additions & 2 deletions docs/self-hosting/kubernetes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -257,14 +257,24 @@ redis:

#### ClickHouse

<Note>Trigger.dev requires ClickHouse 25.8 or newer.</Note>

<Note>
When upgrading from a chart version that bundled ClickHouse via the Bitnami subchart, the chart
automatically adopts the existing data volume, so no manual migration is needed. If you render
manifests without cluster access (for example with GitOps tools that use `helm template`), set
`clickhouse.persistence.existingClaim` to the old PVC name
(`data-<release>-clickhouse-shard0-0`) to keep your data.
</Note>

**Direct configuration:**

```yaml
clickhouse:
deploy: false
external:
host: "my-clickhouse.example.com"
port: 8123
httpPort: 8123
username: "my-username"
password: "my-password"
```
Expand All @@ -276,7 +286,7 @@ clickhouse:
deploy: false
external:
host: "my-clickhouse.example.com"
port: 8123
httpPort: 8123
username: "my-username"
existingSecret: "clickhouse-credentials"
# existingSecretKey: "clickhouse-password" # default (optional)
Expand Down
2 changes: 1 addition & 1 deletion hosting/docker/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ OBJECT_STORE_SECRET_ACCESS_KEY=very-safe-password
# POSTGRES_IMAGE_TAG=14
# REDIS_IMAGE_TAG=7
# ELECTRIC_IMAGE_TAG=1.0.13
# CLICKHOUSE_IMAGE_TAG=latest
# CLICKHOUSE_IMAGE_TAG=26.2
# REGISTRY_IMAGE_TAG=2
# MINIO_IMAGE_TAG=latest
# DOCKER_PROXY_IMAGE_TAG=latest
Expand Down
17 changes: 17 additions & 0 deletions hosting/docker/clickhouse/data-paths.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!--
Keeps ClickHouse's on-disk layout compatible with data volumes created by
the previous Bitnami-based setup, which stored everything under a data/
subdirectory of the volume. Fresh installs get the same layout. tmp lives
outside data/ because old volumes contain a dangling tmp symlink there.
-->
<clickhouse>
<path>/var/lib/clickhouse/data/</path>
<tmp_path>/var/lib/clickhouse/tmp/</tmp_path>
<user_files_path>/var/lib/clickhouse/data/user_files/</user_files_path>
<format_schema_path>/var/lib/clickhouse/data/format_schemas/</format_schema_path>
<user_directories>
<local_directory>
<path>/var/lib/clickhouse/data/access/</path>
</local_directory>
</user_directories>
</clickhouse>
18 changes: 13 additions & 5 deletions hosting/docker/webapp/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,18 +155,26 @@ services:
start_period: 10s

clickhouse:
image: bitnamilegacy/clickhouse:${CLICKHOUSE_IMAGE_TAG:-latest}
image: clickhouse/clickhouse-server:${CLICKHOUSE_IMAGE_TAG:-26.2}
restart: ${RESTART_POLICY:-unless-stopped}
logging: *logging-config
ports:
- ${CLICKHOUSE_PUBLISH_IP:-127.0.0.1}:9123:8123
- ${CLICKHOUSE_PUBLISH_IP:-127.0.0.1}:9090:9000
ulimits:
nofile:
soft: 262144
hard: 262144
environment:
CLICKHOUSE_ADMIN_USER: ${CLICKHOUSE_USER:-default}
CLICKHOUSE_ADMIN_PASSWORD: ${CLICKHOUSE_PASSWORD:-password}
CLICKHOUSE_USER: ${CLICKHOUSE_USER:-default}
CLICKHOUSE_PASSWORD: ${CLICKHOUSE_PASSWORD:-password}
CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: 1
volumes:
- clickhouse:/bitnami/clickhouse
- ../clickhouse/override.xml:/bitnami/clickhouse/etc/config.d/override.xml:ro
# The same volume works across upgrades from the previous Bitnami-based
# setup: data-paths.xml keeps the on-disk layout compatible.
- clickhouse:/var/lib/clickhouse
- ../clickhouse/data-paths.xml:/etc/clickhouse-server/config.d/data-paths.xml:ro
- ../clickhouse/override.xml:/etc/clickhouse-server/config.d/override.xml:ro
Comment thread
coderabbitai[bot] marked this conversation as resolved.
networks:
- webapp
healthcheck:
Expand Down
7 changes: 2 additions & 5 deletions hosting/k8s/helm/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@ dependencies:
- name: redis
repository: oci://registry-1.docker.io/bitnamicharts
version: 21.2.6
- name: clickhouse
repository: oci://registry-1.docker.io/bitnamicharts
version: 9.4.4
- name: minio
repository: oci://registry-1.docker.io/bitnamicharts
version: 17.0.9
digest: sha256:e1b572ab8eca0cc376311398c27b1734d8a598095fccc81dd9c32b2c8b9c1149
generated: "2026-05-05T10:31:58.493590751+01:00"
digest: sha256:a735954c8b78fcf5b30689bdcdfed66b9be57135368ea696aff2b52ecd731474
generated: "2026-07-13T16:36:15.800113+01:00"
4 changes: 0 additions & 4 deletions hosting/k8s/helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ dependencies:
version: "21.2.6"
repository: "oci://registry-1.docker.io/bitnamicharts"
condition: redis.deploy
- name: clickhouse
version: "9.4.4"
repository: "oci://registry-1.docker.io/bitnamicharts"
condition: clickhouse.deploy
- name: minio
Comment thread
matt-aitken marked this conversation as resolved.
version: "17.0.9"
repository: "oci://registry-1.docker.io/bitnamicharts"
Expand Down
49 changes: 42 additions & 7 deletions hosting/k8s/helm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -408,14 +408,46 @@ http://{{ include "trigger-v4.fullname" . }}-s2:{{ .Values.s2.service.port }}/v1
{{- end -}}
{{- end }}

{{/*
Percent-encode a string for the userinfo part of a URL. urlquery encodes
spaces as `+` (query semantics), which userinfo decoding keeps literal; a
real `+` becomes `%2B`, so any `+` left in the output is a space and can be
rewritten to `%20`.
*/}}
{{- define "trigger-v4.urlencode" -}}
{{- . | urlquery | replace "+" "%20" -}}
{{- end }}

{{/*
ClickHouse data-paths config. Keeps the on-disk layout compatible with data
volumes created by the Bitnami subchart this chart used previously, which
stored everything under a data/ subdirectory of the volume. Fresh installs
get the same layout. tmp lives outside data/ because old volumes contain a
dangling tmp symlink there. Users can override by defining their own
data-paths.xml in clickhouse.configdFiles.
*/}}
{{- define "trigger-v4.clickhouse.dataPathsConfig" -}}
<clickhouse>
<path>/var/lib/clickhouse/data/</path>
<tmp_path>/var/lib/clickhouse/tmp/</tmp_path>
<user_files_path>/var/lib/clickhouse/data/user_files/</user_files_path>
<format_schema_path>/var/lib/clickhouse/data/format_schemas/</format_schema_path>
<user_directories>
<local_directory>
<path>/var/lib/clickhouse/data/access/</path>
</local_directory>
</user_directories>
</clickhouse>
{{- end }}

{{/*
ClickHouse hostname
*/}}
{{- define "trigger-v4.clickhouse.hostname" -}}
{{- if .Values.clickhouse.host }}
{{- .Values.clickhouse.host }}
{{- else if .Values.clickhouse.deploy }}
{{- printf "%s-clickhouse" .Release.Name }}
{{- printf "%s-clickhouse" (include "trigger-v4.fullname" .) }}
Comment thread
matt-aitken marked this conversation as resolved.
{{- end }}
{{- end }}

Expand All @@ -434,19 +466,22 @@ so any inner `${...}` reaches goose verbatim and fails URL parsing.
CLICKHOUSE_PASSWORD must contain only URL-userinfo-safe characters — the
value is substituted verbatim, so `@ : / ? # [ ] %` break the URL. Use a
hex-encoded password or percent-encode before storing in the Secret.

Inline credentials (auth.* and external.* values) are percent-encoded, so
any special characters are safe there.
*/}}
{{- define "trigger-v4.clickhouse.url" -}}
{{- if .Values.clickhouse.deploy -}}
{{- $protocol := ternary "https" "http" .Values.clickhouse.secure -}}
{{- $secure := ternary "true" "false" .Values.clickhouse.secure -}}
{{ $protocol }}://{{ .Values.clickhouse.auth.username }}:{{ .Values.clickhouse.auth.password }}@{{ include "trigger-v4.clickhouse.hostname" . }}:8123?secure={{ $secure }}
{{ $protocol }}://{{ include "trigger-v4.urlencode" .Values.clickhouse.auth.username }}:{{ include "trigger-v4.urlencode" .Values.clickhouse.auth.password }}@{{ include "trigger-v4.clickhouse.hostname" . }}:{{ .Values.clickhouse.service.ports.http }}?secure={{ $secure }}
{{- else if .Values.clickhouse.external.host -}}
{{- $protocol := ternary "https" "http" .Values.clickhouse.external.secure -}}
{{- $secure := ternary "true" "false" .Values.clickhouse.external.secure -}}
{{- if .Values.clickhouse.external.existingSecret -}}
{{ $protocol }}://{{ .Values.clickhouse.external.username }}:$(CLICKHOUSE_PASSWORD)@{{ .Values.clickhouse.external.host }}:{{ .Values.clickhouse.external.httpPort | default 8123 }}?secure={{ $secure }}
{{ $protocol }}://{{ include "trigger-v4.urlencode" .Values.clickhouse.external.username }}:$(CLICKHOUSE_PASSWORD)@{{ .Values.clickhouse.external.host }}:{{ .Values.clickhouse.external.httpPort | default 8123 }}?secure={{ $secure }}
{{- else -}}
{{ $protocol }}://{{ .Values.clickhouse.external.username }}:{{ .Values.clickhouse.external.password }}@{{ .Values.clickhouse.external.host }}:{{ .Values.clickhouse.external.httpPort | default 8123 }}?secure={{ $secure }}
{{ $protocol }}://{{ include "trigger-v4.urlencode" .Values.clickhouse.external.username }}:{{ include "trigger-v4.urlencode" .Values.clickhouse.external.password }}@{{ .Values.clickhouse.external.host }}:{{ .Values.clickhouse.external.httpPort | default 8123 }}?secure={{ $secure }}
{{- end -}}
{{- end -}}
{{- end }}
Expand All @@ -460,13 +495,13 @@ applies to the replication URL.
{{- define "trigger-v4.clickhouse.replication.url" -}}
{{- if .Values.clickhouse.deploy -}}
{{- $protocol := ternary "https" "http" .Values.clickhouse.secure -}}
{{ $protocol }}://{{ .Values.clickhouse.auth.username }}:{{ .Values.clickhouse.auth.password }}@{{ include "trigger-v4.clickhouse.hostname" . }}:8123
{{ $protocol }}://{{ include "trigger-v4.urlencode" .Values.clickhouse.auth.username }}:{{ include "trigger-v4.urlencode" .Values.clickhouse.auth.password }}@{{ include "trigger-v4.clickhouse.hostname" . }}:{{ .Values.clickhouse.service.ports.http }}
{{- else if .Values.clickhouse.external.host -}}
{{- $protocol := ternary "https" "http" .Values.clickhouse.external.secure -}}
{{- if .Values.clickhouse.external.existingSecret -}}
{{ $protocol }}://{{ .Values.clickhouse.external.username }}:$(CLICKHOUSE_PASSWORD)@{{ .Values.clickhouse.external.host }}:{{ .Values.clickhouse.external.httpPort | default 8123 }}
{{ $protocol }}://{{ include "trigger-v4.urlencode" .Values.clickhouse.external.username }}:$(CLICKHOUSE_PASSWORD)@{{ .Values.clickhouse.external.host }}:{{ .Values.clickhouse.external.httpPort | default 8123 }}
{{- else -}}
{{ $protocol }}://{{ .Values.clickhouse.external.username }}:{{ .Values.clickhouse.external.password }}@{{ .Values.clickhouse.external.host }}:{{ .Values.clickhouse.external.httpPort | default 8123 }}
{{ $protocol }}://{{ include "trigger-v4.urlencode" .Values.clickhouse.external.username }}:{{ include "trigger-v4.urlencode" .Values.clickhouse.external.password }}@{{ .Values.clickhouse.external.host }}:{{ .Values.clickhouse.external.httpPort | default 8123 }}
{{- end -}}
{{- end -}}
{{- end }}
Expand Down
Loading