@trigger.dev/sdk 4.5.4 → 4.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = "4.5.4";
4
+ exports.VERSION = "4.5.6";
5
5
  //# sourceMappingURL=version.js.map
@@ -1,2 +1,2 @@
1
- export const VERSION = "4.5.4";
1
+ export const VERSION = "4.5.6";
2
2
  //# sourceMappingURL=version.js.map
@@ -75,12 +75,23 @@ git clone --depth=1 https://github.com/triggerdotdev/trigger.dev
75
75
  cd trigger.dev/hosting/docker
76
76
  ```
77
77
 
78
- 2. Create a `.env` file
78
+ 2. Create a `.env` file and generate secrets
79
79
 
80
80
  ```bash
81
81
  cp .env.example .env
82
+
83
+ # Fills the required secrets in .env with strong, unique values.
84
+ # Safe to re-run - it never overwrites a secret you've already set.
85
+ ./generate-secrets.sh
82
86
  ```
83
87
 
88
+ <Note>
89
+ The stack ships no working default credentials. `generate-secrets.sh` fills the
90
+ application secrets and the bundled datastore passwords with strong, unique values.
91
+ Keep them safe - rotating the encryption key or session secret later will invalidate
92
+ existing sessions and encrypted data.
93
+ </Note>
94
+
84
95
  3. Start the webapp
85
96
 
86
97
  ```bash
@@ -130,6 +141,13 @@ docker compose up -d
130
141
 
131
142
  4. Configure the supervisor using the [environment variables](/self-hosting/env/supervisor) in your `.env` file, including the [worker token](#worker-token).
132
143
 
144
+ <Warning>
145
+ For a split webapp/worker setup, set `MANAGED_WORKER_SECRET` on the worker to
146
+ the **same** value as the webapp's `MANAGED_WORKER_SECRET`. Don't run
147
+ `generate-secrets.sh` on the worker host - it would create a mismatched value
148
+ and the worker would fail to authenticate.
149
+ </Warning>
150
+
133
151
  5. Apply the changes:
134
152
 
135
153
  ```bash
@@ -11,7 +11,8 @@ mode: "wide"
11
11
  | `SESSION_SECRET` | Yes | — | Session encryption secret. Run: `openssl rand -hex 16` |
12
12
  | `MAGIC_LINK_SECRET` | Yes | — | Magic link encryption secret. Run: `openssl rand -hex 16` |
13
13
  | `ENCRYPTION_KEY` | Yes | — | Secret store encryption key. Run: `openssl rand -hex 16` |
14
- | `MANAGED_WORKER_SECRET` | No | managed-secret | Managed worker secret. Should be changed and match supervisor. |
14
+ | `MANAGED_WORKER_SECRET` | Yes | | Managed worker secret. Must be set and match supervisor. Run: `openssl rand -hex 32` |
15
+ | `ALLOW_INSECURE_DEFAULT_SECRETS` | No | false | Boot even if a secret is still a known-insecure published default. Temporary escape hatch for values you can't safely rotate yet (see [Secret generation and rotation](/self-hosting/kubernetes#secret-generation-and-rotation)). |
15
16
  | **Domains & ports** | | | |
16
17
  | `REMIX_APP_PORT` | No | 3030 | Remix app port. |
17
18
  | `APP_ORIGIN` | Yes | http://localhost:3030 | App origin URL. |
@@ -121,8 +121,10 @@ The default values are insecure and are only suitable for testing. You will need
121
121
  Create a `values-custom.yaml` file to override the defaults. For example:
122
122
 
123
123
  ```yaml
124
- # Generate new secrets with `openssl rand -hex 16`
125
- # WARNING: You should probably use an existingSecret instead
124
+ # Leave these unset to have the chart auto-generate strong values on first
125
+ # install (retained across upgrades). Set them explicitly only if you need to
126
+ # control the value - e.g. sharing MANAGED_WORKER_SECRET with an external
127
+ # supervisor - or use an existingSecret.
126
128
  secrets:
127
129
  enabled: true
128
130
  sessionSecret: "your-32-char-hex-secret-1"
@@ -133,6 +135,8 @@ secrets:
133
135
  # - SESSION_SECRET
134
136
  # - MAGIC_LINK_SECRET
135
137
  # - ENCRYPTION_KEY
138
+ # - PROVIDER_SECRET
139
+ # - COORDINATOR_SECRET
136
140
  # - MANAGED_WORKER_SECRET
137
141
  # - OBJECT_STORE_ACCESS_KEY_ID
138
142
  # - OBJECT_STORE_SECRET_ACCESS_KEY
@@ -176,6 +180,24 @@ helm upgrade -n trigger --install trigger \
176
180
  -f values-custom.yaml
177
181
  ```
178
182
 
183
+ ### Secret generation and rotation
184
+
185
+ Application, control-plane, and bundled-datastore secrets left unset are generated on
186
+ first install and **retained across `helm upgrade`** - they are never rotated
187
+ automatically, so sessions, encrypted data, and datastore volumes survive upgrades.
188
+
189
+ <Warning>
190
+ GitOps tools that render with `helm template` (e.g. Argo CD) cannot read the existing
191
+ secret, so they regenerate these values on every sync - which rotates them. If you
192
+ deploy via GitOps, always supply your own `secrets.existingSecret` (and datastore
193
+ credentials) so nothing is generated in-cluster.
194
+ </Warning>
195
+
196
+ There is no clean migration for a compromised `ENCRYPTION_KEY`: changing it makes
197
+ existing encrypted data unreadable. If a deployment is still running a previously
198
+ published default and cannot rotate yet, set `ALLOW_INSECURE_DEFAULT_SECRETS=true` on
199
+ the webapp to keep booting while you plan a migration.
200
+
179
201
  ### Extra env
180
202
 
181
203
  You can set extra environment variables on all services. For example:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trigger.dev/sdk",
3
- "version": "4.5.4",
3
+ "version": "4.5.6",
4
4
  "description": "trigger.dev Node.JS SDK",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -66,7 +66,7 @@
66
66
  "dependencies": {
67
67
  "@opentelemetry/api": "1.9.1",
68
68
  "@opentelemetry/semantic-conventions": "1.41.1",
69
- "@trigger.dev/core": "4.5.4",
69
+ "@trigger.dev/core": "4.5.6",
70
70
  "chalk": "^5.2.0",
71
71
  "cronstrue": "^2.21.0",
72
72
  "debug": "^4.3.4",