feat: rolling update

This commit is contained in:
Andras Bacsai
2023-08-21 18:00:12 +02:00
parent a3f3470137
commit bed959f1cd
19 changed files with 263 additions and 118 deletions

View File

@@ -161,7 +161,7 @@ Route::post('/source/github/events', function () {
$found = ApplicationPreview::where('application_id', $application->id)->where('pull_request_id', $pull_request_id)->first();
if ($found) {
$found->delete();
$container_name = generate_container_name($application->uuid, $pull_request_id);
$container_name = generateApplicationContainerName($application->uuid, $pull_request_id);
ray('Stopping container: ' . $container_name);
remote_process(["docker rm -f $container_name"], $application->destination->server);
return response('Preview Deployment closed.');