-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.published.yml
More file actions
143 lines (134 loc) · 4.04 KB
/
Copy pathdocker-compose.published.yml
File metadata and controls
143 lines (134 loc) · 4.04 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
name: durable-workflow-server
x-server-image: &server-image ${DW_SERVER_IMAGE:-durableworkflow/server:${DW_SERVER_TAG:-2.0.0-rc.17}}
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:-2.0.0-rc.17}}
APP_DEBUG: ${APP_DEBUG:-false}
LOG_CHANNEL: ${LOG_CHANNEL:-stderr}
LOG_LEVEL: ${LOG_LEVEL:-info}
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_TASK_DISPATCH_MODE: ${DW_TASK_DISPATCH_MODE:-poll}
DW_AUTH_DRIVER: ${DW_AUTH_DRIVER:-token}
DW_AUTH_TOKEN: ${DW_AUTH_TOKEN:-dev-token}
DW_PRINCIPAL_TOKENS: ${DW_PRINCIPAL_TOKENS:-${WORKFLOW_SERVER_PRINCIPAL_TOKENS:-}}
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:
bootstrap:
image: *server-image
platform: ${DW_SERVER_PLATFORM:-}
command: ["server-bootstrap"]
healthcheck:
disable: true
environment:
<<: *server-environment
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_healthy
server:
image: *server-image
platform: ${DW_SERVER_PLATFORM:-}
ports:
- "${SERVER_PORT:-8080}:8080"
environment:
<<: *server-environment
DW_SERVER_TOPOLOGY_SHAPE: standalone_server
DW_SERVER_PROCESS_CLASS: server_http_node
depends_on:
bootstrap:
condition: service_completed_successfully
mysql:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/api/ready"]
interval: 10s
timeout: 5s
retries: 3
worker:
image: *server-image
platform: ${DW_SERVER_PLATFORM:-}
command: php artisan queue:work --sleep=1 --tries=3 --max-time=3600
healthcheck:
test: ["CMD", "server-process-healthcheck", "worker"]
interval: 5s
timeout: 3s
retries: 3
start_period: 5s
environment:
<<: *server-environment
DW_SERVER_TOPOLOGY_SHAPE: standalone_server
DW_SERVER_PROCESS_CLASS: worker_node
depends_on:
bootstrap:
condition: service_completed_successfully
server:
condition: service_healthy
mysql:
condition: service_healthy
redis:
condition: service_healthy
scheduler:
image: *server-image
platform: ${DW_SERVER_PLATFORM:-}
init: true
command: >-
sh -c 'while true; do php artisan schedule:evaluate --limit=100 --json; php artisan activity:timeout-enforce --limit=100; php artisan history:prune --limit=100; sleep 10; done'
healthcheck:
test: ["CMD", "server-process-healthcheck", "scheduler"]
interval: 5s
timeout: 3s
retries: 3
start_period: 5s
environment:
<<: *server-environment
DW_SERVER_TOPOLOGY_SHAPE: standalone_server
DW_SERVER_PROCESS_CLASS: scheduler_node
depends_on:
bootstrap:
condition: service_completed_successfully
mysql:
condition: service_healthy
redis:
condition: service_healthy
mysql:
image: mysql:${MYSQL_VERSION:-8.0}
environment:
MYSQL_DATABASE: ${DB_DATABASE:-durable_workflow}
MYSQL_USER: ${DB_USERNAME:-workflow}
MYSQL_PASSWORD: ${DB_PASSWORD:-workflow}
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD:-root}
volumes:
- mysql_data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 5s
timeout: 3s
retries: 20
redis:
image: redis:${REDIS_VERSION:-7-alpine}
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
volumes:
mysql_data:
redis_data: