1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-07 17:10:05 +01:00

move caddy

This commit is contained in:
Taylor Otwell
2016-05-07 07:30:14 -05:00
parent 869c0d57a1
commit 177d5f512b
6 changed files with 23 additions and 2 deletions

View File

16
src/CaddyFile.php Normal file
View 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');
}
}

View File

@@ -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);
} }

View File

@@ -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/>

View File

@@ -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);