Archived
Added autodeploy
This commit is contained in:
1 parent
25323b4cef
commit
9e8bdd30d9
2 files changed
+73
No files matched your search
+43
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace Deployer;
|
||||
|
||||
require 'recipe/laravel.php';
|
||||
require 'contrib/npm.php';
|
||||
|
||||
// Config
|
||||
|
||||
set('git_ssh_command', 'ssh');
|
||||
set('repository', 'git@ssh.git.lovelynet.net:9001/PriceyBot/PriceyBotPanel.git');
|
||||
|
||||
add('shared_files', []);
|
||||
add('shared_dirs', []);
|
||||
add('writable_dirs', []);
|
||||
|
||||
set('http_user', 'nginx');
|
||||
set('http_group', 'nginx');
|
||||
set('writable_mode', 'chmod');
|
||||
|
||||
// Hosts
|
||||
host('production')
|
||||
->set('hostname', 'vps.benjamyn.love')
|
||||
->set('port', '22')
|
||||
->set('remote_user', 'root')
|
||||
->set('deploy_path'), '/opt/PriceyBotPanel');
|
||||
|
||||
|
||||
// Tasks
|
||||
task('npm:build', function () {
|
||||
$command = match (get('alias')) {
|
||||
'production' => 'production',
|
||||
'staging' => 'development',
|
||||
default => 'production'
|
||||
};
|
||||
|
||||
run("cd {{release_path}} && {{bin/npm}} run {$command}");
|
||||
});
|
||||
|
||||
// Hooks
|
||||
after('deploy:vendors', 'npm:install');
|
||||
after('npm:install', 'npm:build');
|
||||
after('deploy:failed', 'deploy:unlock');
|
||||
Reference in new issue
Block a user