You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -6210,6 +6210,207 @@ from the detail view. Each action maps to a `POST` on the same run id and
6210
6210
returns either `200` with the resulting state or `409` when the action is
6211
6211
not valid for the run's current state.
6212
6212
6213
+
# Self-Hosting Deployments
6214
+
6215
+
Durable Workflow v2 supports several self-hosted shapes. Pick the smallest path
6216
+
that matches the environment you operate, then keep the image, database, cache,
6217
+
auth, readiness, and upgrade contract explicit.
6218
+
6219
+
This guide covers the standalone server distribution. If you run the Laravel
6220
+
package embedded in your own app, use the package installation and configuration
6221
+
pages instead.
6222
+
6223
+
## Deployment support matrix
6224
+
6225
+
| Path | Start from | Supported for | Not promised by this path | Commercial support starts when |
6226
+
| --- | --- | --- | --- | --- |
6227
+
| Local development and internal non-production | [`docker-compose.published.yml`](https://github.com/durable-workflow/server/blob/main/docker-compose.published.yml) with `DW_SERVER_TAG=0.2` or `DW_SERVER_IMAGE=durableworkflow/server:0.2` | One developer machine, LAN demos, shared staging, SDK and worker integration tests | Internet-facing production, durable backup guarantees, strict secret rotation, multi-node failover | You want help turning a working dev stack into a production runbook |
6228
+
| Single-node production | [`docker-compose.published.yml`](https://github.com/durable-workflow/server/blob/main/docker-compose.published.yml) with a production env file, MySQL and Redis volumes, role-scoped tokens, backups, TLS through a reverse proxy, and pinned image tags or digests | One VM, VPS, or internal Docker host with persistent workflow state and a simple operational model | Host-level HA, automatic database failover, multi-region recovery, zero-downtime major topology changes | The deployment carries production traffic and you want review of backup, restore, auth, TLS, upgrade, or rollback procedures |
6229
+
| Small clustered deployment | Published `durableworkflow/server` or `ghcr.io/durable-workflow/server` images using the [Compose recipe](https://github.com/durable-workflow/server/blob/main/docker-compose.published.yml) as the container/process template, with shared external MySQL/PostgreSQL and Redis | Horizontal API and worker capacity when one node is no longer enough | Database/cache HA design, cross-region operation, bespoke load-balancer behavior, generic "works everywhere" orchestration guarantees | You need sizing, failure-domain, rollout, or recovery planning across more than one host |
6230
+
| Raw Kubernetes manifests | The server repository [`k8s/`](https://github.com/durable-workflow/server/tree/main/k8s) manifests, using published server images and your existing database, Redis, ingress, and secret management | Teams that already operate Kubernetes and want inspectable manifests for API, worker, scheduler, bootstrap, service, probes, config, and secrets | Helm charts, managed-Kubernetes provider validation, advanced HA, multi-region, custom operators, environment-specific storage/networking/security decisions | You need Helm, overlays, managed-cluster validation, high availability, or provider-specific production planning |
6231
+
| Support-led topologies | A reviewed design based on your environment | Advanced HA, multi-region, bespoke security/networking, private SLOs, custom overlays, migration planning | Self-serve copy/paste operation | The topology itself is part of the product risk |
6232
+
6233
+
The public distribution is intentionally optimized for local development,
6234
+
single-node production, and small clustered deployments. Kubernetes manifests
6235
+
are provided for teams that already operate Kubernetes. Helm charts, advanced
6236
+
HA, multi-region, and provider-specific managed-Kubernetes validation are
6237
+
support-led because they depend on your database, cache, networking, security,
6238
+
runner, and upgrade choices. See the [support boundary](/docs/2.0/support) for
6239
+
the commercial support model.
6240
+
6241
+
## Published images
6242
+
6243
+
Use published images for self-hosted server deployments:
database failover, Helm charts, multi-region, and advanced HA are support-led or
6397
+
tracked separately from the raw-manifest contract.
6398
+
6399
+
## Readiness contract
6400
+
6401
+
Use both health and readiness checks:
6402
+
6403
+
- `GET /api/health` proves the process is serving HTTP.
6404
+
- `GET /api/ready` proves the server can use its configured runtime
6405
+
dependencies, including migrations and default namespace readiness.
6406
+
- `GET /api/cluster/info` proves an authenticated client can discover build
6407
+
identity, control-plane protocol, worker protocol, payload codecs, and server
6408
+
capabilities.
6409
+
- `POST /api/worker/register` proves workers can authenticate into the expected
6410
+
namespace and task queue.
6411
+
6412
+
Do not shift traffic based on `/api/health` alone.
6413
+
6213
6414
# Migrating to 2.0
6214
6415
6215
6416
This guide covers the key changes when upgrading an existing Laravel v1 application to v2.
@@ -7425,89 +7626,25 @@ See the [CLI install page](/docs/2.0/polyglot/cli#install) for a platform-detect
7425
7626
7426
7627
## Deployment
7427
7628
7428
-
### Docker
7429
-
7430
-
Build and run a production image:
7431
-
7432
-
```bash
7433
-
docker build -t my-workflow-server .
7434
-
docker run -d \
7435
-
-p 8080:8080 \
7436
-
-e DB_CONNECTION=mysql \
7437
-
-e DB_HOST=your-db-host \
7438
-
-e DW_AUTH_TOKEN=your-secret \
7439
-
my-workflow-server
7440
-
```
7441
-
7442
-
Run migrations before starting the API:
7443
-
7444
-
```bash
7445
-
docker run --rm \
7446
-
-e DB_CONNECTION=mysql \
7447
-
-e DB_HOST=your-db-host \
7448
-
my-workflow-server \
7449
-
php artisan migrate --force
7450
-
```
7451
-
7452
-
### Kubernetes
7453
-
7454
-
The server is stateless and horizontally scalable. Key considerations:
7455
-
7456
-
- **Shared cache** — Use Redis or another networked cache for multi-node deployments. Long-poll wake-ups use cache-backed signals, so a shared cache ensures prompt task delivery.
7457
-
- **Shared queue** — Use Redis, SQS, or another networked queue backend. Do not use the `sync` driver.
7458
-
- **Database** — MySQL 8.0+, PostgreSQL 13+, or compatible. Run migrations as a Kubernetes Job before starting the API.
7459
-
- **Liveness probe** — `GET /api/health`
7460
-
- **Readiness probe** — `GET /api/health`
7461
-
7462
-
Example deployment manifest:
7463
-
7464
-
```yaml
7465
-
apiVersion: apps/v1
7466
-
kind: Deployment
7467
-
metadata:
7468
-
name: workflow-server
7469
-
spec:
7470
-
replicas: 3
7471
-
selector:
7472
-
matchLabels:
7473
-
app: workflow-server
7474
-
template:
7475
-
metadata:
7476
-
labels:
7477
-
app: workflow-server
7478
-
spec:
7479
-
containers:
7480
-
- name: server
7481
-
image: my-workflow-server:latest
7482
-
ports:
7483
-
- containerPort: 8080
7484
-
env:
7485
-
- name: DB_CONNECTION
7486
-
value: mysql
7487
-
- name: DB_HOST
7488
-
value: mysql-service
7489
-
- name: CACHE_STORE
7490
-
value: redis
7491
-
- name: REDIS_HOST
7492
-
value: redis-service
7493
-
- name: DW_AUTH_TOKEN
7494
-
valueFrom:
7495
-
secretKeyRef:
7496
-
name: workflow-secrets
7497
-
key: auth-token
7498
-
livenessProbe:
7499
-
httpGet:
7500
-
path: /api/health
7501
-
port: 8080
7502
-
initialDelaySeconds: 10
7503
-
periodSeconds: 10
7504
-
readinessProbe:
7505
-
httpGet:
7506
-
path: /api/health
7507
-
port: 8080
7508
-
initialDelaySeconds: 5
7509
-
periodSeconds: 5
7510
-
```
7629
+
Use the [self-hosting deployment guide](/docs/2.0/deployment) to choose a
7630
+
supported topology before deploying production traffic. It separates local
7631
+
development, single-node production, small clustered deployments, raw
7632
+
Kubernetes manifests, and support-led topologies.
7633
+
7634
+
For self-hosted server deployments, start from published images rather than
0 commit comments