-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.php
54 lines (39 loc) · 1.13 KB
/
config.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
<?php
declare(strict_types=1);
use Dotenv\Dotenv;
/**
* Configuration file
*/
$dotenv = Dotenv::createImmutable(dirname(__DIR__));
$dotenv->load();
define('ROOT_URL', '/');
/**
* Database settings
*/
define('DB_USER', $_ENV['MYSQL_USER']);
define('DB_PASSWORD', $_ENV['MYSQL_PASSWORD']);
define('DB_HOST', $_ENV['MYSQL_HOST']);
define('DB_NAME', $_ENV['MYSQL_DATABASE']);
// Key for tokens hashing
define('SECRET_KEY', $_ENV['SECRET_KEY']);
/**
* Storing settings
*/
// If false - images storing locally
define('AWS_STORING', false);
define('S3_REGION', $_ENV['S3_REGION']);
define('S3_URL', $_ENV['S3_URL']);
define('S3_ACCESS_KEY', $_ENV['S3_ACCESS_KEY']);
define('S3_SECRET_KEY', $_ENV['S3_SECRET_KEY']);
define('S3_BUCKET_NAME', $_ENV['S3_BUCKET_NAME']);
/**
* Exceptions/Errors
*/
// Showing errors info
define('SHOW_ERRORS', true);
// Logs directory
define('LOG_DIR', __DIR__ . '/../logs/' . date('Y-m-d') . '.txt');
// High level errors handlers
error_reporting(E_ALL);
set_error_handler('Ilyamur\PhpMvc\Service\ErrorHandler::errorHandler');
set_exception_handler('Ilyamur\PhpMvc\Service\ErrorHandler::exceptionHandler');