-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose-workflows.yaml
178 lines (168 loc) · 4.54 KB
/
compose-workflows.yaml
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
version: '3'
services:
api:
build:
context: ./
dockerfile: Dockerfile
env_file: ./docker.env
environment:
- SERVICE_TYPE=MAIN_BACKEND
- DB_CONNECTOR_HOST=http://db-connector
- DB_CONNECTOR_PORT=3002
- DB_SSH_CONNECTOR_HOST=http://db-ssh-connector
- DB_SSH_CONNECTOR_PORT=3002
- WORKFLOW_TEMPORAL_CLUSTER_FRONTEND_HOST=temporal
- WORKFLOW_TEMPORAL_CLUSTER_FRONTEND_PORT=7233
- WORKFLOW_BACKEND_HOST=http://api:3000
- CODE_EXECUTOR_INGRESS_DOMAIN=http://code-executor:3004
networks:
- frontend-network
- backend-network
- db-connector-network
- db-ssh-connector-network
- workflows-network
- code-executor-network
depends_on:
- postgres
- db-connector
- db-ssh-connector
- jobs-runner
- workflows-worker
- code-executor
command: bash -c "./docker_scripts/wait-for-it.sh postgres:5432; ./docker_scripts/start_api.sh"
links:
- postgres
ports:
- '3000:3000'
restart: on-failure
jobs-runner:
build:
context: ./
dockerfile: Dockerfile
env_file: ./docker.env
environment:
- SERVICE_TYPE=JOBS_RUNNER
networks:
- backend-network
depends_on:
- postgres
command: bash -c "chmod -R +x ./docker_scripts; sync; ./docker_scripts/wait-for-it.sh postgres:5432; ./docker_scripts/start_api.sh"
links:
- postgres
db-connector:
build:
context: ./
dockerfile: Dockerfile
env_file: ./docker.env
environment:
- SERVICE_TYPE=DB_CONNECTOR_SERVICE
- DBCONNECTOR_POSTGRES_POOL_MAX_SIZE=100
- DBCONNECTOR_QUERY_TIMEOUT_MS=120000
networks:
- db-connector-network
restart: on-failure
db-ssh-connector:
build:
context: ./
dockerfile: Dockerfile
command: bash -c "./docker_scripts/generate_key_pair.sh; ./docker_scripts/start_api.sh"
env_file: ./docker.env
environment:
- SERVICE_TYPE=DB_SSH_CONNECTOR_SERVICE
- DBCONNECTOR_POSTGRES_POOL_MAX_SIZE=100
- DBCONNECTOR_QUERY_TIMEOUT_MS=120000
networks:
- db-ssh-connector-network
restart: on-failure
workflows-worker:
build:
context: ./
dockerfile: Dockerfile
command: bash -c "./docker_scripts/wait-for-it.sh postgres:5432; ./docker_scripts/start_api.sh"
env_file: ./docker.env
depends_on:
- temporal
environment:
- SERVICE_TYPE=WORKFLOW_TEMPORAL_WORKER
- NODE_OPTIONS=--max_old_space_size=1024
- DISABLE_DATABASE_MIGRATIONS=true
- WORKFLOW_TEMPORAL_CLUSTER_FRONTEND_HOST=temporal
- WORKFLOW_TEMPORAL_CLUSTER_FRONTEND_PORT=7233
- WORKFLOW_BACKEND_HOST=http://api:3000
- CODE_EXECUTOR_INGRESS_DOMAIN=http://code-executor:3004
networks:
- backend-network
- db-connector-network
- workflows-network
- code-executor-network
restart: on-failure
code-executor:
build:
context: ./
dockerfile: CodeExecutor.Dockerfile
command: bash -c "./start.sh"
env_file: ./docker.env
environment:
- NODE_OPTIONS=--max_old_space_size=1024
networks:
- code-executor-network
privileged: true
restart: on-failure
postgres:
image: 'postgres:15.4'
env_file: docker.env
networks:
- backend-network
- db-connector-network
- temporal-network
volumes:
- data:/var/lib/postgresql/data
ports:
- '5432:5432'
temporal:
container_name: temporal
env_file: ./docker.env
environment:
- DB=postgresql
- DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/development-sql.yaml
image: tryretool/one-offs:retool-temporal-1.1.2
networks:
- temporal-network
- workflows-network
ports:
- '127.0.0.1:7233:7233'
volumes:
- ./dynamicconfig:/etc/temporal/config/dynamicconfig
temporal-admin-tools:
container_name: temporal-admin-tools
depends_on:
- temporal
environment:
- TEMPORAL_CLI_ADDRESS=temporal:7233
image: temporalio/admin-tools:1.18.5
networks:
- temporal-network
stdin_open: true
tty: true
temporal-ui:
container_name: temporal-ui
depends_on:
- temporal
environment:
- TEMPORAL_ADDRESS=temporal:7233
- TEMPORAL_CORS_ORIGINS=http://localhost:3000
image: temporalio/ui:2.9.1
networks:
- temporal-network
ports:
- '8080:8080'
networks:
frontend-network:
backend-network:
workflows-network:
db-connector-network:
db-ssh-connector-network:
temporal-network:
code-executor-network:
volumes:
data: