-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dedicated-matching.yml
More file actions
93 lines (86 loc) · 3.45 KB
/
docker-compose.dedicated-matching.yml
File metadata and controls
93 lines (86 loc) · 3.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: durable-workflow-server
# Compose override that enables the dedicated matching-role daemon shape on
# top of `docker-compose.published.yml`. The default shape runs the in-worker
# matching-role wake on every Looping event, which is the right default for
# small deployments. Larger deployments can opt execution-only workers out of
# the broad-poll wake and let a single dedicated daemon own the sweep.
#
# Usage:
# docker compose \
# -f docker-compose.published.yml \
# -f docker-compose.dedicated-matching.yml \
# up
#
# This override:
# - promotes the public HTTP server into the split control-plane class so
# every long-running service in the deployment reports the same
# `split_control_execution` topology family
# - sets DW_V2_MATCHING_ROLE_QUEUE_WAKE=false on every long-running service
# so process-local matching-role diagnostics consistently report the
# dedicated repair pass as the broad-poll wake owner instead of implying
# an in-worker wake loop on HTTP, scheduler, or matching-only nodes
# - execution-only workers therefore no longer broad-poll the durable task
# table on every Looping event
# - adds a `matching` service running `php artisan workflow:v2:repair-pass
# --loop` so the broad sweep runs in a dedicated process the operator can
# scale and observe independently
#
# Operators can confirm which shape each node is running through the
# `matching_role` block on `GET /api/system/metrics`: the worker reports
# `shape: in_worker` with `queue_wake_enabled: false`, and the matching
# daemon reports `shape: dedicated`.
x-server-image: &server-image ${DW_SERVER_IMAGE:-durableworkflow/server:${DW_SERVER_TAG:-0.2}}
x-server-environment: &server-environment
APP_NAME: "Durable Workflow Server"
APP_ENV: ${APP_ENV:-local}
DW_SERVER_KEY: ${DW_SERVER_KEY:-}
APP_VERSION: ${APP_VERSION:-${DW_SERVER_TAG:-0.2}}
APP_DEBUG: ${APP_DEBUG:-false}
DB_CONNECTION: mysql
DB_HOST: mysql
DB_PORT: 3306
DB_DATABASE: ${DB_DATABASE:-durable_workflow}
DB_USERNAME: ${DB_USERNAME:-workflow}
DB_PASSWORD: ${DB_PASSWORD:-workflow}
REDIS_HOST: redis
QUEUE_CONNECTION: redis
CACHE_STORE: redis
DW_AUTH_DRIVER: ${DW_AUTH_DRIVER:-token}
DW_AUTH_TOKEN: ${DW_AUTH_TOKEN:-dev-token}
DW_WORKER_TOKEN: ${DW_WORKER_TOKEN:-}
DW_OPERATOR_TOKEN: ${DW_OPERATOR_TOKEN:-}
DW_ADMIN_TOKEN: ${DW_ADMIN_TOKEN:-}
DW_AUTH_BACKWARD_COMPATIBLE: ${DW_AUTH_BACKWARD_COMPATIBLE:-true}
services:
server:
environment:
DW_V2_MATCHING_ROLE_QUEUE_WAKE: "false"
DW_SERVER_TOPOLOGY_SHAPE: split_control_execution
DW_SERVER_PROCESS_CLASS: control_plane_node
worker:
environment:
DW_V2_MATCHING_ROLE_QUEUE_WAKE: "false"
DW_SERVER_TOPOLOGY_SHAPE: split_control_execution
DW_SERVER_PROCESS_CLASS: execution_node
scheduler:
environment:
DW_V2_MATCHING_ROLE_QUEUE_WAKE: "false"
DW_SERVER_TOPOLOGY_SHAPE: split_control_execution
DW_SERVER_PROCESS_CLASS: scheduler_node
matching:
image: *server-image
platform: ${DW_SERVER_PLATFORM:-}
init: true
command: php artisan workflow:v2:repair-pass --loop
environment:
<<: *server-environment
DW_V2_MATCHING_ROLE_QUEUE_WAKE: "false"
DW_SERVER_TOPOLOGY_SHAPE: split_control_execution
DW_SERVER_PROCESS_CLASS: matching_node
depends_on:
bootstrap:
condition: service_completed_successfully
mysql:
condition: service_healthy
redis:
condition: service_healthy