-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.php
40 lines (33 loc) · 1.04 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
<?php
namespace Deployer;
require 'recipe/laravel.php';
require_once realpath(__DIR__ . '/vendor/autoload.php');
$dotenv = \Dotenv\Dotenv::createImmutable(__DIR__);
$dotenv->load();
set('application', 'social');
set('repository', 'git@github.com:lukaszradziak/laravel-social-app.git');
set('git_tty', true);
add('shared_files', []);
add('shared_dirs', ['node_modules', 'nova']);
add('writable_dirs', []);
set('allow_anonymous_stats', false);
set('keep_releases', 5);
set('ssh_multiplexing', true);
host('host343376.hostido.net.pl')
->user('host343376')
->set('http_user', 'host343376')
->set('writable_mode', 'chmod')
->port(64321)
->set('deploy_path', '~/domains/social.lukaszradziak.pl/app')
->set('bin/php', function () {
return 'php8.0';
})
->set('bin/composer', function () {
return 'php8.0 /usr/local/bin/composer';
});
task('build', function () {
run('cd {{release_path}} && npm i && npm run prod');
});
after('artisan:optimize', 'build');
after('deploy:failed', 'deploy:unlock');
before('deploy:symlink', 'artisan:migrate');