Revize 6209fbe5
Přidáno uživatelem Filip Jani před téměř 6 roky(ů)
app/bootstrap-local.php | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
$env = 'dev'; |
app/bootstrap.php | ||
---|---|---|
4 | 4 |
|
5 | 5 |
$configurator = new Nette\Configurator; |
6 | 6 |
|
7 |
$configurator->setDebugMode(TRUE); // enable for your remote IP |
|
8 |
$configurator->enableTracy(__DIR__ . '/../log'); |
|
7 |
include __DIR__ . '/bootstrap-local.php'; |
|
8 |
|
|
9 |
// dev prostředí, kytičky, sluníčko, všechno hezky funguje |
|
10 |
if ($env === 'dev') |
|
11 |
{ |
|
12 |
$configurator->setDebugMode(TRUE); // enable for your remote IP |
|
13 |
$configurator->enableTracy(__DIR__ . '/../log'); |
|
14 |
$configurator->setTempDirectory(__DIR__ . '/../temp'); |
|
15 |
} |
|
16 |
|
|
17 |
// CIV prostředí, hovna, sračky, jsou to prostě nejlepčí kucí |
|
18 |
else |
|
19 |
{ |
|
20 |
$logDir = '/tmp/klinopis/log'; |
|
21 |
$tempDir = '/tmp/klinopis/temp'; |
|
22 |
|
|
23 |
if (!file_exists($logDir)) |
|
24 |
{ |
|
25 |
mkdir($logDir, 0700, TRUE); |
|
26 |
} |
|
27 |
|
|
28 |
if (!file_exists($tempDir)) |
|
29 |
{ |
|
30 |
mkdir($tempDir, 0700, TRUE); |
|
31 |
} |
|
32 |
|
|
33 |
$configurator->enableTracy($logDir); |
|
34 |
$configurator->setTempDirectory($tempDir); |
|
35 |
} |
|
9 | 36 |
|
10 | 37 |
$configurator->setTimeZone('Europe/Prague'); |
11 |
$configurator->setTempDirectory(__DIR__ . '/../temp'); |
|
12 | 38 |
|
13 | 39 |
$configurator->createRobotLoader() |
14 | 40 |
->addDirectory(__DIR__) |
Také k dispozici: Unified diff
Úprava bootstrapu pro cache a logování na serveru CIVu