-
-
Notifications
You must be signed in to change notification settings - Fork 231
/
Copy pathconfiguration.php
121 lines (97 loc) · 4.48 KB
/
configuration.php
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
<?php
if (!getenv('FUSIO_ENV')) {
$dotenv = new \Symfony\Component\Dotenv\Dotenv();
$dotenv->load(__DIR__ . '/.env');
}
return [
// Whether the implicit flow is allowed. This is mostly needed for
// javascript apps
'fusio_grant_implicit' => true,
// Expire times of the different tokens which can be issued
'fusio_expire_implicit' => 'PT1H',
'fusio_expire_app' => 'P2D',
'fusio_expire_backend' => 'PT1H',
'fusio_expire_consumer' => 'PT1H',
// How long can you use the refresh token after the access token was
// generated
'fusio_expire_refresh' => 'P3D',
// The secret key of a project. It is recommended to change this to another
// random value. This is used i.e. to encrypt the connection credentials in
// the database. NOTE IF YOU CHANGE THE KEY FUSIO CAN NO LONGER READ ANY
// DATA WHICH WAS ENCRYPTED BEFORE. BECAUSE OF THAT IT IS RECOMMENDED TO
// CHANGE THE KEY ONLY BEFORE THE INSTALLATION
'fusio_project_key' => getenv('FUSIO_PROJECT_KEY'),
// Settings of the internal mailer. By default we use the internal PHP mail
// function
/*
'fusio_mailer' => [
'transport' => 'smtp',
'host' => 'email-smtp.us-east-1.amazonaws.com',
'port' => 587,
'username' => 'my-username',
'password' => 'my-password',
'encryption' => 'tls',
],
*/
// Location of the automatically generated cron file. Note Fusio writes only
// to this file if it exists. In order to use the cronjob service you need
// to create this file with i.e. "touch /etc/cron.d/fusio"
'fusio_cron_file' => '/etc/cron.d/fusio',
// Command to execute the Fusio console which is used in the generated cron
// file
'fusio_cron_exec' => '/usr/bin/php ' . __DIR__ . '/bin/fusio',
// In case you want to host the backend app on a different domain you need
// to set a fitting Access-Control-Allow-Origin header. To set a CORS header
// for your app please use the system setting
'fusio_cors' => null,
// The url to the psx public folder (i.e. http://127.0.0.1/psx/public or
// http://localhost.com)
'psx_url' => getenv('FUSIO_URL'),
// The default timezone
'psx_timezone' => 'UTC',
// Whether PSX runs in debug mode or not. If not error reporting is set to 0
// Also several caches are used if the debug mode is false
'psx_debug' => getenv('FUSIO_ENV') != 'prod',
// Database parameters which are used for the doctrine DBAL connection
// http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html
'psx_connection' => [
'dbname' => getenv('FUSIO_DB_NAME'),
'user' => getenv('FUSIO_DB_USER'),
'password' => getenv('FUSIO_DB_PW'),
'host' => getenv('FUSIO_DB_HOST'),
'driver' => 'pdo_mysql',
],
// Folder locations
'psx_path_cache' => __DIR__ . '/cache',
'psx_path_library' => __DIR__ . '/src',
// Supported writers
'psx_supported_writer' => [
\PSX\Data\Writer\Json::class,
\PSX\Data\Writer\Jsonp::class,
\PSX\Data\Writer\Jsonx::class,
],
// Global middleware which are applied before and after every request. Must
// bei either a classname, closure or PSX\Dispatch\FilterInterface instance
//'psx_filter_pre' => [],
//'psx_filter_post' => [],
// A closure which returns a doctrine cache implementation. If null the
// filesystem cache is used
/*
'psx_cache_factory' => function($config, $namespace){
$memcached = new \Memcached();
$memcached->addServer(getenv('FUSIO_MEMCACHE_HOST'), getenv('FUSIO_MEMCACHE_PORT'));
$memcache = new \Doctrine\Common\Cache\MemcachedCache();
$memcache->setMemcached($memcached);
$memcache->setNamespace($namespace);
return $memcache;
},
*/
// A closure which returns a monolog handler implementation. If null the
// system handler is used
//'psx_logger_factory' => null,
// Class name of the error controller
//'psx_error_controller' => null,
// If you only want to change the appearance of the error page you can
// specify a custom template
//'psx_error_template' => null,
];