-
-
Notifications
You must be signed in to change notification settings - Fork 167
/
deploy.php
36 lines (29 loc) · 789 Bytes
/
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
<?php
namespace Deployer;
require 'recipe/laravel.php';
require 'contrib/php-fpm.php';
require 'contrib/npm.php';
set('application', 'mylaravelapp');
set('php_fpm_version', '8.0');
host('prod')
->set('remote_user', 'root')
->set('hostname', 'mylaravelapp.com')
->set('deploy_path', '/var/www/{{hostname}}');
task('deploy', [
'deploy:prepare',
'deploy:vendors',
'artisan:storage:link',
'artisan:view:cache',
'artisan:config:cache',
'artisan:migrate',
'npm:install',
'npm:run:prod',
'deploy:publish',
'php-fpm:reload',
]);
task('npm:run:prod', function () {
cd('{{release_or_current_path}}');
run('npm run prod');
});
after('deploy:failed', 'deploy:unlock');