-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Must use bootstrap.php, otherwise appDir is detected in www
- Loading branch information
1 parent
e4307e4
commit 3758ce6
Showing
2 changed files
with
36 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
use Nette\Diagnostics\Debugger; | ||
|
||
define('APP_DIR', __DIR__ . '/../app'); | ||
|
||
require __DIR__ . '/../vendor/autoload.php'; | ||
\Nette\Diagnostics\Debugger::enable(Debugger::DEVELOPMENT); | ||
|
||
// Configure application | ||
$configurator = new \Nette\Configurator(); | ||
$configurator->setDebugMode(true); | ||
$configurator->setTempDirectory(__DIR__ . '/../temp'); | ||
$configurator->enableDebugger(__DIR__ . '/../log'); | ||
$configurator->createRobotLoader() | ||
->addDirectory(__DIR__ . '/../app') | ||
->addDirectory(__DIR__ . '/../components') | ||
->register(); | ||
|
||
// basic environment resolution | ||
$environment = null; | ||
|
||
// jenkins server runs on nginx | ||
if (false !== strstr($_SERVER["SERVER_SOFTWARE"], "nginx")) { | ||
$environment = "jenkins"; | ||
$configurator->setDebugMode(false); | ||
\Nette\Diagnostics\Debugger::enable(Debugger::PRODUCTION); | ||
} | ||
|
||
$configurator->addConfig(__DIR__ . '/../app/config/config.neon', $environment); | ||
|
||
$container = $configurator->createContainer(); | ||
$container->application->catchExceptions = false; | ||
|
||
return $container; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,5 @@ | ||
<?php | ||
|
||
use Nette\Diagnostics\Debugger; | ||
$container = require __DIR__ . '/../app/bootstrap.php'; | ||
|
||
define('ROOT_DIR', realpath(__DIR__ . '/../')); | ||
define('WWW_DIR', __DIR__); | ||
define('APP_DIR', ROOT_DIR . '/app'); | ||
define('LIBS_DIR', ROOT_DIR . '/libs'); | ||
|
||
// Load libraries | ||
require ROOT_DIR . '/vendor/autoload.php'; | ||
//\Nette\Framework::$iAmUsingBadHost = TRUE; | ||
//\Nette\Diagnostics\Debugger::enable(false); | ||
\Nette\Diagnostics\Debugger::enable(Debugger::DEVELOPMENT); | ||
|
||
// Configure application | ||
$configurator = new \Nette\Configurator(); | ||
$configurator->setDebugMode(true); | ||
$configurator->setTempDirectory(ROOT_DIR . '/temp'); | ||
$configurator->enableDebugger(__DIR__ . '/../log'); | ||
$configurator->createRobotLoader() | ||
->addDirectory(APP_DIR) | ||
->addDirectory(ROOT_DIR . '/components') | ||
// ->addDirectory(LIBS_DIR) | ||
->register(); | ||
|
||
// basic environment resolution | ||
$environment = null; | ||
|
||
// jenkins server runs on nginx | ||
if (false !== strstr($_SERVER["SERVER_SOFTWARE"], "nginx")) { | ||
$environment = "jenkins"; | ||
$configurator->setDebugMode(false); | ||
\Nette\Diagnostics\Debugger::enable(Debugger::PRODUCTION); | ||
} | ||
|
||
$configurator->addConfig(ROOT_DIR . '/app/config/config.neon', $environment); | ||
$container = $configurator->createContainer(); | ||
$container->application->catchExceptions = false; | ||
$container->getService('application')->run(); |