fix
This commit is contained in:
parent
baf6c20997
commit
e84dba493e
1 changed files with 8 additions and 2 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
namespace App\Actions\Proxy;
|
namespace App\Actions\Proxy;
|
||||||
|
|
||||||
|
use App\Enums\ProxyTypes;
|
||||||
use App\Events\ProxyStarted;
|
use App\Events\ProxyStarted;
|
||||||
use App\Models\Server;
|
use App\Models\Server;
|
||||||
use Lorisleiva\Actions\Concerns\AsAction;
|
use Lorisleiva\Actions\Concerns\AsAction;
|
||||||
|
|
@ -37,11 +38,16 @@ public function handle(Server $server, bool $async = true, bool $force = false):
|
||||||
"echo 'Successfully started coolify-proxy.'",
|
"echo 'Successfully started coolify-proxy.'",
|
||||||
]);
|
]);
|
||||||
} else {
|
} else {
|
||||||
$caddfile = 'import /dynamic/*.caddy';
|
if (isDev()) {
|
||||||
|
if ($proxyType === ProxyTypes::CADDY->value) {
|
||||||
|
$proxy_path = '/data/coolify/proxy/caddy';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$caddyfile = 'import /dynamic/*.caddy';
|
||||||
$commands = $commands->merge([
|
$commands = $commands->merge([
|
||||||
"mkdir -p $proxy_path/dynamic",
|
"mkdir -p $proxy_path/dynamic",
|
||||||
"cd $proxy_path",
|
"cd $proxy_path",
|
||||||
"echo '$caddfile' > $proxy_path/dynamic/Caddyfile",
|
"echo '$caddyfile' > $proxy_path/dynamic/Caddyfile",
|
||||||
"echo 'Creating required Docker Compose file.'",
|
"echo 'Creating required Docker Compose file.'",
|
||||||
"echo 'Pulling docker image.'",
|
"echo 'Pulling docker image.'",
|
||||||
'docker compose pull',
|
'docker compose pull',
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue