-
Notifications
You must be signed in to change notification settings - Fork 248
Expand file tree
/
Copy pathapp.php
More file actions
307 lines (226 loc) · 11.9 KB
/
app.php
File metadata and controls
307 lines (226 loc) · 11.9 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
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
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
<?php
use Illuminate\Support\Facades\Facade;
use Illuminate\Support\ServiceProvider;
return [
// The name of our application
'name' => env('APP_NAME', 'ProcessMaker'),
// The url of our host, will usually be set during installation
'url' => env('APP_URL', 'http://localhost'),
// The application key to be used for hashing secrets
'key' => env('APP_KEY', 'base64:x80I9vQNxwllSuwBkTwfUa5qkgPTRdwqHCPSz7zHi1U='),
// The encryption cipher to use, industry standard
'cipher' => 'AES-256-CBC',
// What environment are we running in. Local, prod, etc.
'env' => env('APP_ENV', 'local'),
// Should we place our application in debug mode
'debug' => env('APP_DEBUG', false),
// What's our default cache lifecycle
'cache_lifetime' => env('APP_CACHE_LIFETIME', 60),
// The timezone for the application
'timezone' => env('APP_TIMEZONE', 'America/Los_Angeles'),
// The time format for the application
'dateformat' => env('DATE_FORMAT', 'm/d/Y h:i A'),
// The system locale
'locale' => env('APP_LANG', 'en'),
// The fallback locale
'fallback_locale' => 'en',
// The timeout length for API calls, in milliseconds (0 for no timeout)
'api_timeout' => env('API_TIMEOUT', 5000),
// Hide server headers for security (prevents information disclosure)
'hide_server_headers' => env('HIDE_SERVER_HEADERS', true),
// Disables PHP execution in the storage directory
// TODO Is this config value still used anywhere? :)
'disable_php_upload_execution' => env('DISABLE_PHP_UPLOAD_EXECUTION', 0),
// Option Fractal, Serializer
// TODO Does the ProcessMakerSerializer class exist, if so, we need to fix its namespace :)
'serialize_fractal' => env('SERIALIZE_FRACTAL', ProcessMaker\Transformers\ProcessMakerSerializer::class),
// Option Fractal, paginator
'paginate_fractal' => env('PAGINATE_FRACTAL', League\Fractal\Pagination\IlluminatePaginatorAdapter::class),
// The processmaker identifier of the web client application
'web_client_application_id' => env('PM_CLIENT_ID', 'x-pm-local-client'),
// The processmaker BPM scripts configuration
'processmaker_scripts_home' => env('PROCESSMAKER_SCRIPTS_HOME', __DIR__ . '/../storage/app'),
// Path to docker executable
'processmaker_scripts_docker' => env('PROCESSMAKER_SCRIPTS_DOCKER', '/usr/bin/docker'),
// Docker mode with scripts
'processmaker_scripts_docker_mode' => env('PROCESSMAKER_SCRIPTS_DOCKER_MODE', 'binding'),
// tcp/other protocol uri to the docker host
'processmaker_scripts_docker_host' => env('PROCESSMAKER_SCRIPTS_DOCKER_HOST', ''),
// Default parameters for docker run command
'processmaker_scripts_docker_params' => env('PROCESSMAKER_SCRIPTS_DOCKER_PARAMS', ''),
// Default timeout for scripts
'processmaker_scripts_timeout' => env('PROCESSMAKER_SCRIPTS_TIMEOUT', 'timeout'),
// System-level scripts timeout
'processmaker_system_scripts_timeout_seconds' => env('PROCESSMAKER_SYSTEM_SCRIPTS_TIMEOUT_SECONDS', 300),
// Since the task scheduler has a preset of one minute (crontab), the times
// must be rounded or truncated to the nearest HH:MM:00 before compare
'timer_events_seconds' => env('TIMER_EVENTS_SECONDS', 'truncate'),
// Table locks threshold for process_request_lock table
'bpmn_actions_max_lock_time' => (int) env('BPMN_ACTIONS_MAX_LOCK_TIME', 60),
// Maximum time to wait for a lock to be released. Default 60000 [ms]
// If the processes are going to have thousands of concurrent parallel instances, increase this number.
'bpmn_actions_max_lock_timeout' => (int) env('BPMN_ACTIONS_MAX_LOCK_TIMEOUT', 60000),
// Lock check interval. Default every second. 1000 [ms]
'bpmn_actions_lock_check_interval' => (int) env('BPMN_ACTIONS_LOCK_CHECK_INTERVAL', 1000),
// The url of our host from inside the docker
'docker_host_url' => env(
'DOCKER_HOST_URL',
preg_replace(
'/(\w+):\/\/([^:\/]+)(\:\d+)?/',
'$1://172.17.0.1$3',
env('APP_URL', 'http://localhost')
)
),
'nayra_rest_api_host' => env('NAYRA_REST_API_HOST', ''),
'screen_task_cache_time' => env('SCREEN_TASK_CACHE_TIME', 86400),
// Allows our script executors to ignore invalid SSL. This should only be set to false for development.
'api_ssl_verify' => env('API_SSL_VERIFY', 'true'),
// Unique name on multi-tenant installations. Just use the DB name for now
'instance' => env('DB_DATABASE'),
// Allows to detect if OpenAI is enabled or not
'open_ai_nlq_to_pmql' => env('OPEN_AI_NLQ_TO_PMQL_ENABLED', false) && env('OPEN_AI_SECRET', false),
'open_ai_process_translations' => env('OPEN_AI_PROCESS_TRANSLATIONS_ENABLED', false) &&
env('OPEN_AI_SECRET', false),
// Microservice AI Host
'ai_microservice_host' => env('AI_MICROSERVICE_HOST'),
'ai_microservice_host_ws' => env('AI_MICROSERVICE_HOST_WS'),
// Security log
'security_log' => env('SECURITY_LOG', 'true'),
// Security log custom S3 URI
'security_log_s3_uri' => env('SECURITY_LOG_S3_URI', 'security-logs'),
// PM Analytics Dashboard
'pm_analytics_dashboard' => env('PM_ANALYTICS_DASHBOARD', 'https://localhost'),
// PM Analytics Chart
'pm_analytics_chart' => env('PM_ANALYTICS_CHART', 'https://localhost'),
// Enable default SSO
'enable_default_sso' => env('ENABLE_DEFAULT_SSO', 'true'),
// Message broker driver to use in Workflow Manager
'message_broker_driver' => env('MESSAGE_BROKER_DRIVER', 'default'),
// When true, halt process execution if certain configuration settings are missing
'configuration_debug_mode' => env('CONFIGURATION_DEBUG_MODE', false),
// Global app settings
'settings' => [
// Path to logo image to be used on login page
'login_logo_path' => env('LOGIN_LOGO_PATH', '/img/processmaker-login.svg'),
// Path to site-wide logo image
'main_logo_path' => env('MAIN_LOGO_PATH', '/img/processmaker-logo.svg'),
// Path to site-wide icon
'icon_path' => env('ICON_PATH_PATH', '/img/processmaker-icon.svg'),
// Path to site-wide favicon
'favicon_path' => env('FAVICON_PATH', '/img/favicon.svg'),
// Maximum file size for images to be set as default (in bytes) (5MB)
'img_max_filesize_limit' => env('IMG_MAX_FILESIZE_LIMIT', '5M'),
// Maximum file size for documents to be set as default (in bytes) (10MB)
'doc_max_filesize_limit' => env('DOC_MAX_FILESIZE_LIMIT', '10M'),
// Maximum file size for all files to be set as default (in bytes) (10MB)
'max_filesize_limit' => env('MAX_FILESIZE_LIMIT', '10M'),
],
// Turn on/off the recommendation engine
'recommendations_enabled' => env('RECOMMENDATIONS_ENABLED', true),
// Define the view of the Login
'login_view' => env('LOGIN_VIEW', 'auth.newLogin'),
'providers' => ServiceProvider::defaultProviders()->merge([
Spatie\Multitenancy\MultitenancyServiceProvider::class,
/**
* Package Service Providers
*/
Laravel\Passport\PassportServiceProvider::class,
Laravel\Scout\ScoutServiceProvider::class,
TeamTNT\Scout\TNTSearchScoutServiceProvider::class,
Jenssegers\Agent\AgentServiceProvider::class,
/**
* ProcessMaker Service Providers
*/
ProcessMaker\Providers\ProcessMakerServiceProvider::class,
ProcessMaker\Providers\RecommendationsServiceProvider::class,
ProcessMaker\Providers\AuthServiceProvider::class,
ProcessMaker\Providers\EventServiceProvider::class,
ProcessMaker\Providers\HorizonServiceProvider::class,
ProcessMaker\Providers\TelescopeServiceProvider::class,
ProcessMaker\Providers\RouteServiceProvider::class,
ProcessMaker\Providers\BroadcastServiceProvider::class,
ProcessMaker\Providers\WorkflowServiceProvider::class,
ProcessMaker\Providers\UpgradeServiceProvider::class,
ProcessMaker\Providers\OauthMailServiceProvider::class,
ProcessMaker\Providers\OpenAiServiceProvider::class,
ProcessMaker\Providers\LicenseServiceProvider::class,
ProcessMaker\Providers\MetricsServiceProvider::class,
ProcessMaker\Providers\MixServiceProvider::class,
ProcessMaker\Providers\TenantQueueServiceProvider::class,
ProcessMaker\Providers\JsonOptimizerServiceProvider::class,
])->toArray(),
'aliases' => Facade::defaultAliases()->merge([
'Agent' => Jenssegers\Agent\Facades\Agent::class,
'Docker' => ProcessMaker\Facades\Docker::class,
'ElasticScoutDriver\Factories\SearchRequestFactory' => ProcessMaker\Factories\SearchRequestFactory::class,
'GlobalScripts' => ProcessMaker\Facades\GlobalScripts::class,
'Menu' => Lavary\Menu\Facade::class,
'Redis' => Illuminate\Support\Facades\Redis::class,
'RequestDevice' => ProcessMaker\Facades\RequestDevice::class,
'SkinManager' => ProcessMaker\Facades\SkinManager::class,
'Theme' => Igaster\LaravelTheme\Facades\Theme::class,
'WorkspaceManager' => ProcessMaker\Facades\WorkspaceManager::class,
'SettingCache' => ProcessMaker\Cache\Settings\SettingCacheFacade::class,
'Tenant' => ProcessMaker\Multitenancy\Tenant::class,
])->toArray(),
'debug_blacklist' => [
'_ENV' => [
'DB_USERNAME',
'DB_PASSWORD',
'DATA_DB_PASSWORD',
'DATA_DB_USERNAME',
],
'_SERVER' => [
'DB_USERNAME',
'DB_PASSWORD',
'DATA_DB_PASSWORD',
'DATA_DB_USERNAME',
],
],
// Screen builder options
'screen' => [
'cache_enabled' => env('SCREEN_CACHE_ENABLED', false),
'cache_timeout' => env('SCREEN_CACHE_TIMEOUT', 5000), // timeout in milliseconds
'show_secure_handler_toggle' => filter_var(env('SCREEN_SECURE_HANDLER_TOGGLE_VISIBLE', false), FILTER_VALIDATE_BOOLEAN),
],
'queue_imports' => env('QUEUE_IMPORTS', true),
'node_bin_path' => env('NODE_BIN_PATH', '/usr/bin/node'),
'task_drafts_enabled' => env('TASK_DRAFTS_ENABLED', true),
'force_https' => env('FORCE_HTTPS', true),
'nayra_docker_network' => env('NAYRA_DOCKER_NETWORK', 'host'),
'nayra_port' => env('NAYRA_PORT', 8080),
// Process Request security log rate limit: 1 per day (86400 seconds)
'process_request_errors_rate_limit' => env('PROCESS_REQUEST_ERRORS_RATE_LIMIT', 1),
'process_request_errors_rate_limit_duration' => env('PROCESS_REQUEST_ERRORS_RATE_LIMIT_DURATION', 86400),
'default_colors' => [
'primary' => '#2773F3',
'secondary' => '#728092',
'success' => '#0CA442',
'info' => '#104A75',
'warning' => '#EC8E00',
'danger' => '#EC5962',
'dark' => '#20242A',
'light' => '#FFFFFF',
],
// For encrypted fields
'encrypted_data' => [
'driver' => env('ENCRYPTED_DATA_DRIVER', 'local'),
'key' => env('ENCRYPTED_DATA_KEY', ''),
'vault_host' => env('ENCRYPTED_DATA_VAULT_HOST', ''),
'vault_token' => env('ENCRYPTED_DATA_VAULT_TOKEN', ''),
'vault_transit_key' => env('ENCRYPTED_DATA_VAULT_TRANSIT_KEY', ''),
],
'custom_executors' => env('CUSTOM_EXECUTORS', false),
// Enable or disable TCE customization feature
'tce_customization_enable' => env('TCE_CUSTOMIZATION_ENABLED', false),
'prometheus_namespace' => env('PROMETHEUS_NAMESPACE', strtolower(preg_replace('/[^a-zA-Z0-9_]+/', '_', env('APP_NAME', 'processmaker')))),
'server_timing' => [
'enabled' => env('SERVER_TIMING_ENABLED', true),
'min_package_time' => env('SERVER_TIMING_MIN_PACKAGE_TIME', 5), // Minimum time in milliseconds
],
'editor' => null,
'json_optimization_decode' => env('JSON_OPTIMIZATION_DECODE', false),
'multitenancy' => env('MULTITENANCY', false),
'reassign_restrict_to_assignable_users' => env('REASSIGN_RESTRICT_TO_ASSIGNABLE_USERS', true),
'resources_core_path' => base_path('resources-core'),
];