-
Notifications
You must be signed in to change notification settings - Fork 1
/
deploy.php
35 lines (27 loc) · 1.12 KB
/
deploy.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
30
31
32
33
34
35
<?php
require_once __DIR__ . '/deployer/recipe/yii-configure.php';
require_once __DIR__ . '/deployer/recipe/yii2-app-basic.php';
require_once __DIR__ . '/deployer/recipe/in-place.php';
if (!file_exists (__DIR__ . '/deployer/stage/servers.yml')) {
die('Please create "' . __DIR__ . '/deployer/stage/servers.yml" before continuing.' . "\n");
}
serverList(__DIR__ . '/deployer/stage/servers.yml');
set('repository', '{{repository}}');
set('default_stage', 'production');
set('keep_releases', 2);
set('writable_use_sudo', false); // Using sudo in writable commands?
set('shared_files', [
'config/db.php'
]);
task('deploy:configure_composer', function () {
$stage = env('app.stage');
if($stage == 'dev') {
env('composer_options', 'install --verbose --no-progress --no-interaction');
}
})->desc('Configure composer');
// uncomment the next two lines to run migrations
//after('deploy:symlink', 'deploy:run_migrations');
//after('inplace:configure', 'inplace:run_migrations');
after('deploy:shared', 'deploy:configure');
before('inplace:vendors', 'deploy:configure_composer');
before('deploy:vendors', 'deploy:configure_composer');