wip
This commit is contained in:
@@ -23,6 +23,12 @@ class Form extends Component
|
||||
{
|
||||
$this->server = Server::find($this->server_id);
|
||||
}
|
||||
public function installDocker()
|
||||
{
|
||||
$config = base64_encode('{ "live-restore": true }');
|
||||
runRemoteCommandSync($this->server, ["mkdir -p /etc/docker/", "touch /etc/docker/daemon.json", "echo '{$config}' | base64 -d > /etc/docker/daemon.json"]);
|
||||
runRemoteCommandSync($this->server, ['sh -c "$(curl --silent -fsSL https://get.docker.com)"']);
|
||||
}
|
||||
public function checkConnection()
|
||||
{
|
||||
$this->uptime = runRemoteCommandSync($this->server, ['uptime']);
|
||||
|
||||
@@ -123,12 +123,15 @@ class DeployApplicationJob implements ShouldQueue
|
||||
$this->executeNow([
|
||||
"echo 'Starting deployment of {$this->application->git_repository}:{$this->application->git_branch}...'",
|
||||
"echo -n 'Pulling latest version of the builder image (ghcr.io/coollabsio/coolify-builder)... '",
|
||||
"docker run --pull=always -d --name {$this->deployment_uuid} --rm -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/coollabsio/coolify-builder",
|
||||
"echo 'Done.'",
|
||||
]);
|
||||
|
||||
$this->executeNow([
|
||||
"docker run --pull=always -d --name {$this->deployment_uuid} --rm -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/coollabsio/coolify-builder",
|
||||
], isDebuggable: true);
|
||||
|
||||
// Import git repository
|
||||
$this->executeNow([
|
||||
"echo 'Done.'",
|
||||
"echo -n 'Importing {$this->application->git_repository}:{$this->application->git_branch} to {$this->workdir}... '"
|
||||
]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user