-
Notifications
You must be signed in to change notification settings - Fork 0
/
Envoy.blade.php
83 lines (62 loc) · 1.54 KB
/
Envoy.blade.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
@servers(['web' => 'root@smart-robox.com'])
@setup
$directory = "/home/smartrobox/apps/box/startersite";
$repository = "git@bitbucket.org:boxadvertainment/starter-site.git";
@endsetup
@macro('create')
clone
configure
@endmacro
@macro('deploy')
pull
configure
@endmacro
@macro('refresh')
delete
clone
configure
@endmacro
@task('clone')
git clone -b master {{ $repository }} {{ $directory }};
cd {{ $directory }};
composer self-update;
composer install --prefer-dist --no-dev --no-interaction;
cp .env.production .env;
echo "Project has been created";
@endtask
@task('pull')
cd {{ $directory }};
php artisan down;
git pull origin master;
composer install --prefer-dist --no-dev --no-interaction;
cp .env.production .env;
php artisan up;
echo "Deployment finished successfully!";
@endtask
@task('configure')
cd {{ $directory }};
php artisan config:cache;
php artisan route:cache;
chown -R www-data:www-data {{ $directory }};
echo "Permissions have been set";
@endtask
@task('delete', ['confirm' => true])
rm -rf {{ $directory }};
echo "Project directory has been deleted";
@endtask
@task('reset', ['confirm' => true])
cd {{ $directory }};
git reset --hard HEAD;
@endtask
@task('migrate')
cd {{ $directory }};
php artisan migrate --force;
@endtask
@task('rollback')
cd {{ $directory }};
php artisan migrate:rollback --force;
@endtask
@task('seed')
cd {{ $directory }};
php artisan db:seed --force;
@endtask