Beispiel #1
0
<?php

require __DIR__ . '/vendor/autoload.php';
require 'recipe/common.php';
(new \Dotenv\Dotenv(__DIR__))->load();
// Set default stage
set('default_stage', 'beta');
// Set your config server
server('prod', enviroment('SERVER_HOST'), 2222)->user(enviroment('SERVER_NAME'))->password(enviroment('SERVER_PASS'))->stage('beta')->env('deploy_path', '/home2/pana1990/www/apihhlegends');
// Set repository where fetch code
set('repository', 'ssh://git@altssh.bitbucket.org:443/panamanu/api.git');
env('branch', 'master');
// Set shared dires and files
set('shared_dirs', ['runtime']);
set('shared_files', ['.env']);
/**
 * Main task to deploy your project
 */
task('deploy', ['deploy:prepare', 'deploy:release', 'deploy:update_code', 'deploy:shared', 'deploy:vendors', 'deploy:symlink', 'cleanup'])->desc('Deploy your project');
after('deploy', 'success');
Beispiel #2
0
<?php

require_once __DIR__ . '/../../../vendor/autoload.php';
(new \Dotenv\Dotenv(dirname(__DIR__ . '/../../')))->load();
defined('YII_DEBUG') or define('YII_DEBUG', enviroment('YII_DEBUG', true));
defined('YII_ENV') or define('YII_ENV', enviroment('YII_ENV', 'test'));
defined('YII_APP_BASE_PATH') or define('YII_APP_BASE_PATH', dirname(dirname(dirname(__DIR__))));
require YII_APP_BASE_PATH . '/vendor/yiisoft/yii2/Yii.php';
Yii::setAlias('@tests', dirname(dirname(__DIR__)));
Beispiel #3
0
<?php

return ['class' => 'yii\\swiftmailer\\Mailer', 'useFileTransport' => true, 'transport' => ['class' => 'Swift_SmtpTransport', 'host' => enviroment('MAIL_DRIVER'), 'username' => enviroment('MAIL_HOST'), 'password' => enviroment('MAIL_PORT'), 'port' => enviroment('MAIL_USERNAME'), 'encryption' => enviroment('MAIL_PASSWORD')]];
Beispiel #4
0
<?php

$config = ['id' => 'hhlegends', 'name' => 'hhlegends', 'version' => '1.0.0', 'language' => 'es', 'basePath' => dirname(__DIR__), 'bootstrap' => ['log'], 'modules' => ['v1' => ['basePath' => '@app/modules/v1', 'class' => 'app\\modules\\v1\\Module', 'controllerNamespace' => 'app\\modules\\v1\\controllers']], 'components' => ['request' => ['cookieValidationKey' => enviroment('YII_KEY')], 'cache' => require __DIR__ . '/cache.php', 'user' => ['identityClass' => 'app\\models\\User', 'enableAutoLogin' => true], 'errorHandler' => ['errorAction' => 'site/error'], 'mailer' => require __DIR__ . '/mailer.php', 'log' => ['traceLevel' => YII_DEBUG ? 3 : 0, 'targets' => [['class' => 'yii\\log\\FileTarget', 'levels' => ['error', 'warning']]]], 'db' => require __DIR__ . '/db.php', 'urlManager' => ['enablePrettyUrl' => true, 'showScriptName' => false, 'rules' => require __DIR__ . '/routes.php'], 'request' => ['parsers' => ['application/json' => 'yii\\web\\JsonParser']]], 'params' => require __DIR__ . '/params.php'];
if (YII_ENV_DEV) {
    // configuration adjustments for 'dev' environment
    $config['bootstrap'][] = 'debug';
    $config['modules']['debug'] = ['class' => 'yii\\debug\\Module'];
    $config['bootstrap'][] = 'gii';
    $config['modules']['gii'] = ['class' => 'yii\\gii\\Module'];
}
return $config;
Beispiel #5
0
<?php

return ['class' => 'yii\\db\\Connection', 'dsn' => enviroment('DB_DSN'), 'username' => enviroment('DB_USER'), 'password' => enviroment('DB_PASSWORD'), 'charset' => 'utf8'];