-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.php
More file actions
32 lines (24 loc) · 996 Bytes
/
deploy.php
File metadata and controls
32 lines (24 loc) · 996 Bytes
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
<?php
namespace Deployer;
require 'recipe/laravel.php';
// Config
set('repository', 'git@github.com:codante-io/api-service.git');
add('shared_files', []);
add('shared_dirs', ['database/db']);
add('writable_dirs', ['database/db']);
set('keep_releases', 1);
// Tasks
// run artisan command
task('api-commands', function () {
run('{{bin/php}} {{release_path}}/artisan api:orders-api:reset');
// run('{{bin/php}} {{release_path}}/artisan api:frases-motivacionais:reset');
// run('{{bin/php}} {{release_path}}/artisan migrate --database="olympic_games" --path="database/migrations/olympic_games" --force');
// run('{{bin/php}} {{release_path}}/artisan migrate --database="bloquinhos2025" --path="database/migrations/bloquinhos2025" --force');
})->desc('Reset orders');
// Hosts
host('216.238.108.237')
->set('remote_user', 'robertotcestari')
->set('deploy_path', '/var/www/apis');
// Hooks
after('artisan:migrate', 'api-commands');
after('deploy:failed', 'deploy:unlock');