forked from coollabsio/coolify
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
026f3fd
commit 61f58fa
Showing
9 changed files
with
207 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
namespace App\Actions\Proxy; | ||
|
||
use App\Models\Server; | ||
use Illuminate\Support\Str; | ||
use Lorisleiva\Actions\Concerns\AsAction; | ||
|
||
class SaveConfiguration | ||
{ | ||
use AsAction; | ||
|
||
public function handle(Server $server) | ||
{ | ||
$proxy_settings = CheckConfiguration::run($server, true); | ||
$proxy_path = get_proxy_path(); | ||
$docker_compose_yml_base64 = base64_encode($proxy_settings); | ||
|
||
$server->proxy->last_saved_settings = Str::of($docker_compose_yml_base64)->pipe('md5')->value; | ||
$server->save(); | ||
|
||
return instant_remote_process([ | ||
"mkdir -p $proxy_path", | ||
"echo '$docker_compose_yml_base64' | base64 -d > $proxy_path/docker-compose.yml", | ||
], $server); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.