-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.php
29 lines (23 loc) · 847 Bytes
/
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
<?php
// simple division into prod and dev
// load config, overwrite existing environment variables
if (empty($_SERVER['OS'])) {
$dotenv = Dotenv\Dotenv::createMutable(__DIR__);
} else {
$dotenv = Dotenv\Dotenv::createMutable(__DIR__, '.env.dev');
}
$dotenv->load();
$dotenv->required('PROJECT_NAME')->notEmpty();
$dotenv->required('PROJECT_VERSION')->notEmpty();
$dotenv->required('DIR_COMMAND')->notEmpty();
$dotenv->required('DIR_FILE')->notEmpty();
$dotenv->required('TELEGRAM_TOKEN')->notEmpty();
$dotenv->required('TELEGRAM_TEST_CHAT_ID')->notEmpty();
$dotenv->required('DB_HOST');
$dotenv->required('DB_USERNAME');
$dotenv->required('DB_PASSWORD');
$dotenv->required('DB_NAME');
$dotenv->required('DB_PORT');
$dotenv->required('DB_CHARSET');
$dotenv->required('MAX_OF_MESSAGES_PER_DAY');
$dotenv->required('MAX_LINE_LENGTH');