mirror of
https://github.com/laravel/valet.git
synced 2026-02-07 09:10:03 +01:00
move caddy
This commit is contained in:
16
src/CaddyFile.php
Normal file
16
src/CaddyFile.php
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Valet;
|
||||||
|
|
||||||
|
class CaddyFile
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Install the Caddy configuration file.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public static function install()
|
||||||
|
{
|
||||||
|
copy(__DIR__.'/../stubs/Caddyfile', VALET_HOME_PATH.'/Caddyfile');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -15,6 +15,8 @@ public static function install()
|
|||||||
'VALET_PATH', realpath(__DIR__.'/../'), file_get_contents(__DIR__.'/../stubs/daemon.plist')
|
'VALET_PATH', realpath(__DIR__.'/../'), file_get_contents(__DIR__.'/../stubs/daemon.plist')
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$contents = str_replace('VALET_HOME_PATH', VALET_HOME_PATH, $contents);
|
||||||
|
|
||||||
file_put_contents('/Library/LaunchDaemons/com.laravel.valetServer.plist', $contents);
|
file_put_contents('/Library/LaunchDaemons/com.laravel.valetServer.plist', $contents);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,8 @@
|
|||||||
<string>VALET_PATH</string>
|
<string>VALET_PATH</string>
|
||||||
<key>ProgramArguments</key>
|
<key>ProgramArguments</key>
|
||||||
<array>
|
<array>
|
||||||
<string>./caddy</string>
|
<string>./bin/caddy</string>
|
||||||
|
<string>--conf=VALET_HOME_PATH/Caddyfile</string>
|
||||||
</array>
|
</array>
|
||||||
<key>RunAtLoad</key>
|
<key>RunAtLoad</key>
|
||||||
<true/>
|
<true/>
|
||||||
|
|||||||
@@ -35,9 +35,11 @@
|
|||||||
|
|
||||||
Valet\LaunchDaemon::stop();
|
Valet\LaunchDaemon::stop();
|
||||||
|
|
||||||
|
Valet\Configuration::install();
|
||||||
|
|
||||||
Valet\LaunchDaemon::install();
|
Valet\LaunchDaemon::install();
|
||||||
|
|
||||||
Valet\Configuration::install();
|
Valet\CaddyFile::install();
|
||||||
|
|
||||||
Valet\PhpFpm::install($output);
|
Valet\PhpFpm::install($output);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user