· 5 years ago · Mar 26, 2020, 11:24 AM
1<?php
2
3return [
4 'debug' => true,
5 'test' => [
6 'test_salon_ids' => [4564, 24697, 94898],
7 ],
8 'environment' => 'development',
9 'default_domain' => 'erp.yclients.dev',
10 'connections' => [
11 'db' => [
12 'host' => 'ycl-db',
13 'port' => '3306',
14 'dbname' => 'yclients',
15 'user' => 'root',
16 'password' => '',
17 'connection_timeout' => 1,
18 'retry_max_count' => 5,
19 'retry_interval' => 100,
20 'session_max_execution_time' => 3 *60 * 1000, //3 min
21 'slow_transaction_duration' => 100, //интервал в ms, начиная с которого транзакция бд считается долгой и логируется
22 'cli' => [
23 'interactive_timeout' => 28800,
24 'wait_timeout' => 28800,
25 ],
26 'enable_slaves' => true,
27 'slaves' => [
28 [
29 'host' => 'ycl-db',
30 'port' => '3306',
31 'dbname' => 'yclients',
32 'user' => 'root',
33 'password' => '',
34 ],
35 ],
36 ],
37 'analytics' => [
38 'host' => 'ycl-db',
39 'port' => '3306',
40 'dbname' => 'yclients',
41 'user' => 'root',
42 'password' => '',
43 'retry_max_count' => 5,
44 'retry_interval' => 100,
45 'session_max_execution_time' => 3 * 60 * 1000, //3 min
46 'cli' => [
47 'interactive_timeout' => 28800,
48 'wait_timeout' => 28800,
49 ],
50 ],
51 'google_maps_booking' => [
52 'host' => 'ycl-db',
53 'port' => '3306',
54 'dbname' => 'yclients',
55 'user' => 'root',
56 'password' => '',
57 'retry_max_count' => 5,
58 'retry_interval' => 100,
59 'session_max_execution_time' => 3 * 60 * 1000, //3 min
60 'cli' => [
61 'interactive_timeout' => 28800,
62 'wait_timeout' => 28800,
63 ],
64 ],
65 'clickhouse' => [
66 'host' => 'ycl-clickhouse',
67 'port' => '8123',
68 'user' => 'default',
69 'password' => '',
70 'dbname' => 'yclients',
71 'timeout' => '2',
72 'connect_timeout' => '5',
73 'transport' => 'http',
74 'log' => false
75 ],
76 'elasticsearch' => [
77 'hosts' => [
78 'http://elasticsearch.yclients.cloud:9200',
79 ],
80 'retry_max_count' => 2,
81 'retry_interval' => 100,
82 'connect_timeout' => 1000,
83 ],
84 ],
85 'routes' => [
86 '#.*\.yclients\.dev#' => [
87 'map' => 'index',
88 ]
89 ],
90 'upload_path' => '/yclients/uploads',
91 'robots_txt_path' => '/yclients/src/erp/public',
92 'log' => [
93 'verbose' => true, //for tests
94 'default_file' => '/yclients/logs/erp/web.log',
95 'cli_err_file' => '/yclients/logs/erp/cli.log',
96 'cron_path' => '/yclients/logs/erp/cron',
97 'slack' => [
98 'token' => '',
99 'deduplicate_time' => 60,
100 'channel' => '',
101 ]
102 ],
103 'rabbitmq' => [
104 'host' => 'ycl-rabbitmq',
105 'port' => '5672',
106 'login' => 'guest',
107 'password' => 'guest',
108 'connection_timeout' => 1,
109 'read_write_timeout' => 1,
110 'retry_max_count' => 1,
111 'retry_interval' => 3000,
112 ],
113 'socket' => [
114 'url' => 'https://ws.yclients.dev',
115 'api' => 'https://ws.yclients.dev',
116 'secretKey' => '',
117 ],
118 'storages' => [
119 'elasticsearch' => [
120 'modules' => [
121 'services' => [
122 'actions' => [
123 'search' => [
124 'enabled' => true,
125 'timeout' => 500,
126 'fallback_db' => true,
127 ],
128 'index' => [
129 'enabled' => true,
130 'timeout' => 1000,
131 ],
132 ],
133 'index' => 'test_erp_salon_services',
134 'enabled' => true,
135 ],
136 ],
137 ],
138 ],
139 'analytics' => [
140 'source' => 'db', // db|clickhouse
141 ],
142 'tracing' => [
143 'enabled' => true,
144 'host' => 'jaeger-agent',
145 'port' => 6831,
146 'namespace' => 'debug.biz.erp.web',
147 'threshold' => [
148 'request' => 500,
149 ],
150 ],
151 'metrics' => [
152 'namespace' => '',
153 'statsd' => [
154 'host' => '127.0.0.1',
155 'port' => 8125,
156 ],
157 ],
158 'integrations' => [
159 'amo' => [
160 'host' => 'yclients',
161 'login' => 'amo@yclients.tech',
162 'hash' => '',
163 ],
164 'modul_kassa' => [
165 'host' => 'https://service.modulpos.ru/api/fn/v1/',
166 ],
167 'passteam' => [
168 'login' => 'support@yclients.com',
169 'password' => '',
170 'server_address' => 'https://getpass.passteam.ru/oapi/v1/',
171 'timeout' => 10,
172 'log' => [
173 'filename' => '/yclients/logs/erp/passteam.log',
174 'format' => 'HOST: {host}\n\nREQUEST:\n{request}\n\nRESPONSE:\n{response}\n\n\n',
175 ],
176 ],
177 'sms_provider' => [
178 'timeout' => 5,
179 'connect_timeout' => 3,
180 ],
181 'ylink' => [
182 'api_url' => 'https://ylink.me/api/',
183 'token' => '',
184 'partner_id' => 2818,
185 'timeout' => 10,
186 'log' => [
187 'filename' => 'ylink',
188 ],
189 ],
190 'evotor' => [
191 'partner_id' => '123',
192 'client' => 'http',
193 'clients' => [
194 'http' => [
195 'base_url' => 'https://api.evotor.ru/',
196 'debug_user_token' => '8184d2-62460a232c8e',
197 'app_id' => 'fddb15ee-2c90',
198 'app_token' => '',
199 ],
200 'dummy_client' => [],
201 ],
202 ],
203 'google_maps_booking_api' => [
204 'yclients_service_account' => [
205 'application_name' => 'YCLIENTS',
206 'application_credentials_path' => '/opt/yclients/more/config/secret/keys/integrations/dev/yclients.json',
207 ],
208 'sandbox' => [
209 'buckets' => [
210 'settings' => [
211 'host' => 'partnerupload.google.com',
212 'port' => 19321,
213 'privateKey' => '/opt/yclients/more/config/secret/keys/integrations/dev/id_rsa',
214 'root' => '/',
215 'timeout' => 10,
216 ],
217 'usernames' => [
218 'merchants' => 'feeds-y9d4dp',
219 'services' => 'feeds-7d55c3',
220 'availability' => 'feeds-t44755',
221 ],
222 ],
223 'yclients_api_request_credentials' => [
224 'username' => 'yclients_google_booking',
225 'password' => '',
226 ],
227 'yclients_api_request_fallback_credentials' => [
228 'username' => 'yclients_google_booking',
229 'password' => '',
230 ],
231 ],
232 'production' => [
233 'buckets' => [
234 'settings' => [
235 'host' => 'partnerupload.google.com',
236 'port' => 19321,
237 'privateKey' => '/opt/yclients/more/config/secret/keys/integrations/live/id_rsa',
238 'root' => '/',
239 'timeout' => 10,
240 ],
241 'usernames' => [
242 'merchants' => 'feeds-1l0bm9',
243 'services' => 'feeds-g6wwuh',
244 'availability' => 'feeds-7zi75c',
245 ],
246 ],
247 'yclients_api_request_credentials' => [
248 'username' => 'yclients_google_booking',
249 'password' => '',
250 ],
251 'yclients_api_request_fallback_credentials' => [
252 'username' => 'yclients_google_booking',
253 'password' => '',
254 ],
255 ],
256 ],
257 'google_translate' => [
258 'application_name' => '',
259 'api_key' => '',
260 'timeout' => 10, // Необязательный параметр. Указано значение по умолчанию (сек)
261 'content_quota' => [
262 'user_rate' => [ // При достижении ограничения User Rate Limit Exceeded ("Characters per 100 seconds") делаем новую попытку через retry_interval
263 'retry_interval' => 120000, // Необязательный параметр. Указано значение по умолчанию (миилисек)
264 'retry_max_count' => 5, // Необязательный параметр. Указано значение по умолчанию
265 ],
266 ],
267 ],
268 'funkio' => [
269 'client' => [
270 'api_url' => 'https://app.funkio.io/api/',
271 'token' => '',
272 'timeout' => 5000,
273 ],
274 'auth_url' => 'https://app.funkio.io/auth/?login_token=%s',
275 ],
276 ],
277 'image' => [
278 'check_existence_on_server' => 'false',
279 'server' => [
280 'prefix' => 'https://images.yclients.dev/',
281 'client' => [
282 'driver' => 'local',
283 'driver_settings' => [
284 'local' => [
285 'root' => '/yclients/uploads'
286 ],
287 ]
288 ]
289 ],
290 ],
291 'file' => [
292 'server' => [
293 'client' => [
294 'driver' => 'local',
295 'driver_settings' => [
296 'local' => [
297 'root' => '/yclients/uploads'
298 ],
299 ],
300
301 // Пример настройки sftp сервера. Проверить корректность можно запуском теста php public/include/classes/Tests/SystemTest/SftpClientTest.php
302 //
303 // 'driver' => 'sftp',
304 // 'driver_settings' => [
305 // 'sftp' => [
306 // 'host' => 'files.yclients.tech',
307 // 'port' => 22000,
308 // 'username' => 'sftp-static',
309 // 'privateKey' => '/var/www/yclients/config/secrets/rsa_moreenv_files', #путь на сервере то rsa ключа
310 // 'root' => '/home/sftp-static/data', #путь на sftp сервере к папке, куда есть права на запись файлов
311 // 'timeout' => 10,
312 // 'directoryPerm' => 0755,
313 // ],
314 // ],
315
316 ]
317 ],
318 ],
319 'cache' => [
320 'path' => '/yclients/src/erp/cache',
321 'client' => [
322 'driver' => 'redis',
323 'redis' => [
324 'parameters' => 'tcp://ycl-redis:6379?timeout=0.1&read_write_timeout=0.5&tcp_nodelay=1&password=',
325 'retry_max_count' => 3,
326 'retry_interval' => 1000,
327 ],
328 ],
329 ],
330 'session' => [
331 'handler' => 'redis',
332 'handlers' => [
333 'redis' => [
334 'parameters' => 'tcp://ycl-redis:6379?timeout=0.1&read_write_timeout=0.5&tcp_nodelay=1&password=',
335 'retry_max_count' => 3,
336 'retry_interval' => 1000,
337 ],
338 'tarantool' => [],
339 ],
340 ],
341 'statsd' => [
342 'host' => 'metrics.yclients.cloud',
343 'port' => '8152'
344 ],
345 'translations' => [
346 'local_files' => true,
347 ],
348 'cli' => [
349 'queue' => [
350 'redelivered_delay' => 5000,
351 'lock_wait_timeout' => 3000,
352 ],
353 'prefix' => 'yclients',
354 'command' => [
355 'yclients_daemon_client_notification_repeat_visit_settings' => [
356 'worker' => [
357 'count' => 3,
358 ],
359 ],
360 'yclients_daemon_send_sms' => [
361 'enabled' => true,
362 'worker' => [
363 'count' => 10,
364 ],
365 ],
366 'yclients_daemon_son_parse_records' => [
367 'worker' => [
368 'count' => 10,
369 ],
370 ],
371 'yclients_daemon_parse_files' => [
372 'worker' => [
373 'count' => 5,
374 ],
375 ],
376 'yclients_daemon_internal_sync' => [
377 'worker' => [
378 'count' => 5,
379 ],
380 ],
381 'yclients_daemon_abstract_notifications' => [
382 'worker' => [
383 'count' => 5,
384 ],
385 ],
386 'yclients_daemon_inventory_recount' => [
387 'worker' => [
388 'count' => 2,
389 ],
390 ],
391 'yclients_daemon_email' => [
392 'worker' => [
393 'count' => 6,
394 ],
395 ],
396 'yclients_daemon_master_update_services_by_position' => [
397 'worker' => [
398 'count' => 2,
399 ],
400 ],
401 'yclients_daemon_salon_group_service_attachment_service' => [
402 'worker' => [
403 'count' => 2,
404 ],
405 ],
406 'yclients_daemon_clickhouse_add_changes_log' => [
407 'worker' => [
408 'count' => 5,
409 ],
410 ],
411 'yclients_daemon_client_visit_remind_sms' => [
412 'worker' => [
413 'count' => 5,
414 ],
415 ],
416 'yclients_daemon_hook' => [
417 'worker' => [
418 'count' => 4,
419 ],
420 ],
421 'yclients_daemon_g_cal' => [
422 'worker' => [
423 'count' => 2,
424 ],
425 ],
426 'yclients_daemon_delete_activities' => [
427 'worker' => [
428 'count' => 2,
429 ],
430 ],
431 'yclients_daemon_recount' => [
432 'worker' => [
433 'count' => 2,
434 ],
435 ],
436 'yclients_daemon_elastic_search_salon_services_bulk_index' => [
437 'worker' => [
438 'count' => 5,
439 ],
440 ],
441 'yclients_daemon_google_maps_booking_live_update_availability' => [
442 'worker' => [
443 'count' => 2,
444 ],
445 ],
446 'yclients_daemon_salon_start_reactivation' => [
447 'worker' => [
448 'count' => 2,
449 ],
450 ],
451 ],
452 ],
453 'domains' => [
454 'yclients.com' => 'yclients.com',
455 'moresalonov.ru' => 'moresalonov.ru',
456 'barbershops.me' => 'barbershops.me',
457 'ycl.by' => 'ycl.by',
458 'salon.ms' => 'salon.ms',
459 'big-bro.pro' => 'big-bro.pro',
460 'stilistika.com' => 'stilistika.com',
461 'erp.yclients.dev' => 'erp.yclients.dev'
462 ],
463 'debugAllowedPhones' => [],
464 'debugAllowedEmails' => [],
465 'development' => [
466 'show_error' => true,
467 ],
468 'vue' => [
469 /*
470 Все параметры, включая 'vue' - необязательные
471 Параметры по умолчанию смотреть во Infrastructure\Frontend\Vue\VueConfig
472 */
473 'development' => false,
474 'development-url' => 'http://localhost:8080/',
475 'js-extension' => '.min.js',
476 'development-js-extension' => '.min.js',
477 'apps-folder' => 'vue-app/',
478 ],
479 'db_locking' => [
480 // Все параметры, включая 'db_locking' - необязательные
481 // Параметры по умолчанию смотреть в Infrastructure\Locking\DbLockingConfig
482 'exclusive_lock_name_prefix' => 'EXCLUSIVE_LOCK_',
483 'lock_wait_timeout' => 5,
484 ],
485 'services' => [
486 'sms' => [
487 'gateway_url' => 'http://vs08-htz.yclients.cloud:13003/cgi-bin/sendsms',
488 'delivery_report_url' => 'https://yclients.com/smsdeliv/bycwieybrvrf'
489 ],
490 ],
491];