-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.php
56 lines (42 loc) · 1.61 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
namespace Deployer;
require 'recipe/laravel.php';
require 'contrib/yarn.php';
// Configuration
set('ssh_type', 'native');
set('ssh_multiplexing', true);
set('repository', 'https://github.com/UMN-LATIS/Camino.git');
set('writable_use_sudo', true);
add('shared_files', []);
add('shared_dirs', []);
add('writable_dirs', []);
// ignore specific platform requirements like php 7.4 or php 8.1
set('composer_options', '--verbose --prefer-dist --no-progress --no-interaction --no-dev --optimize-autoloader --ignore-platform-reqs');
// Servers
host('dev')
->set('hostname', 'cla-camino-dev.oit.umn.edu')
->set('remote_user', 'swadm')
->set('labels', ['stage' => 'development'])
->set('bin/php', '/opt/remi/php81/root/usr/bin/php')
->set('deploy_path', '/swadm/var/www/html/');
host('stage')
->set('hostname', 'cla-camino-tst.oit.umn.edu')
->set('remote_user', 'swadm')
->set('labels', ['stage' => 'stage'])
->set('bin/php', '/opt/remi/php81/root/usr/bin/php')
->set('deploy_path', '/swadm/var/www/html/');
host('prod')
->set('hostname', 'cla-camino-prd.oit.umn.edu')
->set('remote_user', 'swadm')
->set('labels', ['stage' => 'production'])
->set('bin/php', '/opt/remi/php81/root/usr/bin/php')
->set('deploy_path', '/swadm/var/www/html/');
task('assets:generate', function () {
cd('{{release_path}}');
run('yarn build');
})->desc('Assets generation');
after('deploy:failed', 'deploy:unlock');
// Migrate database before symlink new release.
before('deploy:symlink', 'artisan:migrate');
after('deploy:update_code', 'yarn:install');
after('deploy:shared', 'assets:generate');