-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcompose.yml
275 lines (275 loc) · 9.01 KB
/
compose.yml
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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
networks:
backend: ~
bdd: ~
amqp: ~
redis: ~
volumes:
caddy_data:
caddy_config:
mongo_data:
services:
mercure:
image: dunglas/mercure:latest
ports:
- 8181:8181
environment:
SERVER_NAME: ':8181'
MERCURE_PUBLISHER_JWT_ALG: 'HS256'
MERCURE_SUBSCRIBER_JWT_ALG: 'HS256'
PUBLISH_ALLOWED_ORIGINS: '*'
ALLOW_ANONYMOUS: 1
MERCURE_EXTRA_DIRECTIVES: |
cors_origins https://localhost
anonymous
CORS_ALLOWED_ORIGINS: '*'
volumes:
- caddy_data:/data
- caddy_config:/config
networks:
- backend
db:
build:
context: ./build.dev/mongo
ports:
- 27017:27017
networks:
- bdd
environment:
MONGO_INITDB_ROOT_USERNAME: admin_space
MONGO_INITDB_ROOT_PASSWORD: space_pwd
MONGO_INITDB_DATABASE: teknoo_space
volumes:
- mongo_data:/data/db
healthcheck:
test: ["CMD", "sh", "-c", "nc -z localhost 27017 || exit 1"]
interval: 30s
retries: 5
start_period: 10s
timeout: 1s
amqp:
build:
context: ./build.dev/rabbitmq
ports:
- 8080:8080
- 5672:5672
environment:
RABBITMQ_USERNAME: space
RABBITMQ_PASSWORD: space_pwd
networks:
- amqp
healthcheck:
test: ["CMD", "sh", "-c", "nc -z localhost 5672 || exit 1"]
interval: 30s
retries: 5
start_period: 240s
timeout: 1s
fpm:
build:
context: build.dev/php-fpm
expose:
- 9000
networks:
- bdd
- backend
- amqp
- redis
links:
- db
volumes:
- ./appliance/:/var/www/space
working_dir: /var/www/space
environment:
- TEKNOO_EAST_EXTENSION_FILE=/var/www/space/extensions/enabled.json
- MAILER_FORBIDDEN_WORDS=.ru,dating,ericjones,SpellPerfect,bit.ly,love,sex,btc,crypto,misspelled,http://,https://bul.tc
- MAILER_REPLY_TO_NAME=Teknoo Space - Support
- MAILER_SENDER_NAME=Teknoo Space App
- MONGODB_NAME=teknoo_space
- PHP_BLACKFIRE_SERVER=blackfire
- SPACE_CLUSTER_ISSUER=lets-encrypt
- SPACE_CODE_SUBSCRIPTION_REQUIRED=1
- SPACE_HOSTNAME=localhost
- SPACE_JOB_ROOT=/tmp
- SPACE_JWT_PUBLIC_KEY=%kernel.project_dir%/var/jwt/public.pem
- SPACE_JWT_SECRET_KEY=%kernel.project_dir%/var/jwt/private.pem
- SPACE_JWT_TTL=31104000
- SPACE_KUBERNETES_CLIENT_TIMEOUT=3
- SPACE_KUBERNETES_CLIENT_VERIFY_SSL=1
- SPACE_KUBERNETES_CREATE_TOKEN=fooBar
- SPACE_KUBERNETES_ROOT_NAMESPACE=space-client-
- SPACE_KUBERNETES_REGISTRY_ROOT_NAMESPACE=space-registry-
- SPACE_OCI_REGISTRY_LIMITS_CPU=100m
- SPACE_OCI_REGISTRY_LIMITS_MEMORY=256Mi
- SPACE_OCI_REGISTRY_REQUESTS_CPU=10m
- SPACE_OCI_REGISTRY_REQUESTS_MEMORY=32Mi
- SPACE_OCI_GLOBAL_REGISTRY_USERNAME=spaceuser
- SPACE_OCI_REGISTRY_IMAGE=registry:latest
- SPACE_OCI_REGISTRY_PVC_SIZE=4Gi
- SPACE_OCI_REGISTRY_TLS_SECRET=registry-certs
- SPACE_REDIS_HOST=redis
- SPACE_REDIS_PORT=6379
- SPACE_STORAGE_CLASS=nfs.csi.k8s.io
- SPACE_PERSISTED_VAR_AGENT_MODE=0
healthcheck:
test: ["CMD", "sh", "-c", "nc -z localhost 9000 || exit 1"]
interval: 30s
retries: 5
start_period: 240s
timeout: 1s
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
cli_new_job:
build:
context: build.dev/php-cli
networks:
- bdd
- backend
- amqp
links:
- db
volumes:
- ./appliance/:/var/www/space
working_dir: /var/www/space
command: ["bin/console", "messenger:consume", "new_job"]
environment:
- MONGODB_NAME=teknoo_space
- SPACE_CLUSTER_ISSUER=lets-encrypt
- SPACE_HOSTNAME=localhost
- SPACE_JWT_PUBLIC_KEY=%kernel.project_dir%/var/jwt/public.pem
- SPACE_JWT_SECRET_KEY=%kernel.project_dir%/var/jwt/private.pem
- SPACE_JWT_TTL=31104000
- SPACE_PING_FILE=var/ping_file
- SPACE_PING_SECONDS=60
- SPACE_PERSISTED_VAR_AGENT_MODE=1
healthcheck:
test: ["CMD", "sh", "-c", "[ $$(( $$(date +%s) - $$(stat var/ping_file -c %Y) )) -lt 120 ]"]
interval: 30s
retries: 5
start_period: 240s
timeout: 1s
depends_on:
db:
condition: service_healthy
amqp:
condition: service_healthy
cli_job_done:
build:
context: build.dev/php-cli
networks:
- bdd
- amqp
links:
- db
volumes:
- ./appliance/:/var/www/space
working_dir: /var/www/space
command: ["bin/console", "messenger:consume", "job_done"]
environment:
- MONGODB_NAME=teknoo_space
- SPACE_HOSTNAME=localhost
- SPACE_JWT_PUBLIC_KEY=%kernel.project_dir%/var/jwt/public.pem
- SPACE_JWT_SECRET_KEY=%kernel.project_dir%/var/jwt/private.pem
- SPACE_JWT_TTL=31104000
- SPACE_PING_FILE=var/ping_file
- SPACE_PING_SECONDS=60
- SPACE_PERSISTED_VAR_AGENT_MODE=0
healthcheck:
test: ["CMD", "sh", "-c", "[ $$(( $$(date +%s) - $$(stat var/ping_file -c %Y) )) -lt 120 ]"]
interval: 30s
retries: 5
start_period: 240s
timeout: 1s
depends_on:
db:
condition: service_healthy
amqp:
condition: service_healthy
cli_history_sent:
build:
context: build.dev/php-cli
networks:
- bdd
- amqp
links:
- db
volumes:
- ./appliance/:/var/www/space
working_dir: /var/www/space
command: ["bin/console", "messenger:consume", "history_sent"]
environment:
- MONGODB_NAME=teknoo_space
- SPACE_HOSTNAME=localhost
- SPACE_JWT_PUBLIC_KEY=%kernel.project_dir%/var/jwt/public.pem
- SPACE_JWT_SECRET_KEY=%kernel.project_dir%/var/jwt/private.pem
- SPACE_JWT_TTL=31104000
- SPACE_PING_FILE=var/ping_file
- SPACE_PING_SECONDS=60
- SPACE_PERSISTED_VAR_AGENT_MODE=0
healthcheck:
test: ["CMD", "sh", "-c", "[ $$(( $$(date +%s) - $$(stat var/ping_file -c %Y) )) -lt 120 ]"]
interval: 30s
retries: 5
start_period: 240s
timeout: 1s
depends_on:
db:
condition: service_healthy
amqp:
condition: service_healthy
cli_execute:
build:
context: build.dev/php-buildah
privileged: true
networks:
- amqp
volumes:
- ./appliance/:/var/www/space
working_dir: /var/www/space
command: ["bin/console", "messenger:consume", "execute_job"]
environment:
- SPACE_HOSTNAME=localhost
- SPACE_JOB_ROOT=/tmp
- SPACE_JWT_PUBLIC_KEY=%kernel.project_dir%/var/jwt/public.pem
- SPACE_JWT_SECRET_KEY=%kernel.project_dir%/var/jwt/private.pem
- SPACE_JWT_TTL=31104000
- SPACE_KUBERNETES_CLIENT_TIMEOUT=3
- SPACE_KUBERNETES_CLIENT_VERIFY_SSL=1
- SPACE_PING_FILE=var/ping_file
- SPACE_PING_SECONDS=60
- SPACE_STORAGE_CLASS=nfs.csi.k8s.io
- SPACE_STORAGE_DEFAULT_SIZE=3Gi
- SPACE_PERSISTED_VAR_AGENT_MODE=0
healthcheck:
test: ["CMD", "sh", "-c", "[ $$(( $$(date +%s) - $$(stat var/ping_file -c %Y) )) -lt 120 ]"]
interval: 30s
retries: 5
start_period: 240s
timeout: 1s
httpd:
build:
context: build.dev/httpd
ports:
- 80:80
- 443:443
networks:
- backend
volumes:
- ./appliance/public:/var/www/space/public
redis:
build:
context: build.dev/redis
networks:
- redis
healthcheck:
test: ["CMD", "sh", "-c", "nc -z localhost 6379 || exit 1"]
interval: 30s
retries: 5
start_period: 240s
timeout: 1s
blackfire:
image: blackfire/blackfire:2
ports: ["8307"]
networks:
- backend