mirror of
https://github.com/elyby/accounts.git
synced 2024-12-12 16:39:01 +05:30
f33439d829
Build nginx and mariadb together with the app image. Upgrade docker-compose configuration to 3 version. Add cleanup step to the gitlab-ci.
37 lines
1003 B
PHP
37 lines
1003 B
PHP
<?php
|
|
|
|
use api\aop\AspectKernel;
|
|
use common\config\ConfigLoader;
|
|
use yii\web\Application;
|
|
|
|
$time = microtime(true);
|
|
|
|
require __DIR__ . '/../vendor/autoload.php';
|
|
|
|
defined('YII_DEBUG') || define('YII_DEBUG', in_array(getenv('YII_DEBUG'), ['true', '1'], false));
|
|
defined('YII_ENV') || define('YII_ENV', getenv('YII_ENV'));
|
|
|
|
// Initialize an application aspect container
|
|
AspectKernel::getInstance()->init([
|
|
'debug' => YII_DEBUG,
|
|
'appDir' => dirname(__DIR__),
|
|
'cacheDir' => __DIR__ . '/runtime/aspect',
|
|
'excludePaths' => [
|
|
__DIR__ . '/runtime/aspect',
|
|
__DIR__ . '/../vendor',
|
|
],
|
|
]);
|
|
|
|
require __DIR__ . '/../vendor/yiisoft/yii2/Yii.php';
|
|
require __DIR__ . '/../common/config/bootstrap.php';
|
|
require __DIR__ . '/config/bootstrap.php';
|
|
|
|
$config = ConfigLoader::load('api');
|
|
|
|
$application = new Application($config);
|
|
$application->run();
|
|
|
|
$timeDifference = (microtime(true) - $time) * 1000;
|
|
fastcgi_finish_request();
|
|
Yii::$app->statsd->time('request.time', $timeDifference);
|