Some changes
This commit is contained in:
parent
ad033b369b
commit
0ab36a8755
|
|
@ -17,9 +17,9 @@ class BackupController extends Controller
|
||||||
*/
|
*/
|
||||||
public function test()
|
public function test()
|
||||||
{
|
{
|
||||||
$created_at = Backup::all()-> pluck('created_at');
|
$created_at = Backup::all()-> pluck('created_at');
|
||||||
|
return $created_at;
|
||||||
return $created_at; }
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Store a newly created resource in storage.
|
* Store a newly created resource in storage.
|
||||||
|
|
@ -35,13 +35,18 @@ class BackupController extends Controller
|
||||||
$message = preg_replace('/\s+/', '&', $message);
|
$message = preg_replace('/\s+/', '&', $message);
|
||||||
parse_str($message, $data);
|
parse_str($message, $data);
|
||||||
|
|
||||||
$schedule = Schedule::firstOrNew(array(
|
$schedule = Schedule::updateOrCreate(
|
||||||
'client_id' => $client_id,
|
['client_id' => $client_id, 'name' => $schedule_name],
|
||||||
'name' => $schedule_name,
|
['last_backup_status' => $data['ParsedResult']]
|
||||||
));
|
);
|
||||||
|
|
||||||
$schedule->last_backup_status = $data['ParsedResult'];
|
// $schedule = Schedule::firstOrNew(array(
|
||||||
$schedule->save();
|
// 'client_id' => $client_id,
|
||||||
|
// 'name' => $schedule_name,
|
||||||
|
// ));
|
||||||
|
|
||||||
|
// $schedule->last_backup_status = $data['ParsedResult'];
|
||||||
|
// $schedule->save();
|
||||||
|
|
||||||
// Sort out timestamps from $message
|
// Sort out timestamps from $message
|
||||||
|
|
||||||
|
|
|
||||||
20
deploy.php
20
deploy.php
|
|
@ -3,8 +3,11 @@ namespace Deployer;
|
||||||
|
|
||||||
require 'recipe/laravel.php';
|
require 'recipe/laravel.php';
|
||||||
|
|
||||||
|
set('http_user', 'panelmy');
|
||||||
|
//set('writable_use_sudo', true);
|
||||||
|
|
||||||
// Project name
|
// Project name
|
||||||
set('application', 'domains/panel.mydentalbackup.co.uk/public_html');
|
set('application', '/home/panel.mydentalbackup.co.uk/public_html');
|
||||||
|
|
||||||
// Project repository
|
// Project repository
|
||||||
set('repository', 'git@git.nabble.co.uk:mshillam/mdbpanel.git');
|
set('repository', 'git@git.nabble.co.uk:mshillam/mdbpanel.git');
|
||||||
|
|
@ -17,13 +20,13 @@ add('shared_files', []);
|
||||||
add('shared_dirs', []);
|
add('shared_dirs', []);
|
||||||
|
|
||||||
// Writable dirs by web server
|
// Writable dirs by web server
|
||||||
add('writable_dirs', []);
|
add('writable_dirs', ['current']);
|
||||||
set('allow_anonymous_stats', false);
|
set('allow_anonymous_stats', false);
|
||||||
|
|
||||||
// Hosts
|
// Hosts
|
||||||
|
|
||||||
host('192.168.20.2')
|
host('192.168.20.7')
|
||||||
->set('deploy_path', '~/{{application}}');
|
->set('deploy_path', '{{application}}');
|
||||||
|
|
||||||
// Tasks
|
// Tasks
|
||||||
|
|
||||||
|
|
@ -31,10 +34,19 @@ task('build', function () {
|
||||||
run('cd {{release_path}} && build');
|
run('cd {{release_path}} && build');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Chown files to correct user
|
||||||
|
*/
|
||||||
|
//task('deploy:chown', function () {
|
||||||
|
// run('chown -R panelmy:panelmy ' . get('deploy_path'));
|
||||||
|
//});
|
||||||
|
|
||||||
// [Optional] if deploy fails automatically unlock.
|
// [Optional] if deploy fails automatically unlock.
|
||||||
after('deploy:failed', 'deploy:unlock');
|
after('deploy:failed', 'deploy:unlock');
|
||||||
|
|
||||||
|
|
||||||
// Migrate database before symlink new release.
|
// Migrate database before symlink new release.
|
||||||
|
|
||||||
|
//before('deploy:symlink', 'deploy:chown');
|
||||||
before('deploy:symlink', 'artisan:migrate');
|
before('deploy:symlink', 'artisan:migrate');
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue