@@ -38,7 +38,7 @@ public static function createLaravelConfigFromEnv(callable $envFunction): array
38
38
self ::ORCH_REGION_IDS => ["array " ],
39
39
],
40
40
"local " => [
41
- self ::ORCH_TYPE => ["required " , "in:dashboard,orchestration " ],
41
+ self ::ORCH_TYPE => ["required " , "in:local " ],
42
42
self ::ORCH_LOCAL_DIRECTORY_PATH => ["string " , "required " ],
43
43
],
44
44
default => throw new \Exception ("Unknown orch type: $ orchType " ),
@@ -47,7 +47,7 @@ public static function createLaravelConfigFromEnv(callable $envFunction): array
47
47
return [
48
48
self ::ORCH_TYPE => $ orchType ,
49
49
self ::ORCH_BASE_URL => $ envFunction (self ::ORCH_BASE_URL ),
50
- self ::ORCH_HOSTNAME => $ envFunction (self ::ORCH_HOSTNAME ),
50
+ self ::ORCH_HOSTNAME => $ envFunction (self ::ORCH_HOSTNAME ) ?: null ,
51
51
self ::ORCH_SECRET => $ envFunction (self ::ORCH_SECRET ),
52
52
self ::ORCH_REGION_IDS => array_filter (explode (", " , $ envFunction ("ORCH_REGION_IDS " , "" )), "trim " ),
53
53
self ::ORCH_USER_AGENT => $ envFunction (self ::ORCH_USER_AGENT ),
@@ -69,7 +69,7 @@ public static function providerFromLaravelConfig(callable $configFunction): Site
69
69
$ orchHostname = $ configFunction ("orch. " . self ::ORCH_HOSTNAME );
70
70
$ secret = $ configFunction ("orch. " . self ::ORCH_SECRET );
71
71
$ regionIDs = $ configFunction ("orch. " . self ::ORCH_REGION_IDS );
72
- $ userAgent = $ configFunction ("orch " . self ::ORCH_USER_AGENT );
72
+ $ userAgent = $ configFunction ("orch. " . self ::ORCH_USER_AGENT );
73
73
74
74
$ provider = match ($ orchType ) {
75
75
"dashboard " => new Dashboard \DashboardSiteProvider (
@@ -80,6 +80,9 @@ public static function providerFromLaravelConfig(callable $configFunction): Site
80
80
new Clients \OrchHttpClient ($ orchBaseUrl , $ secret , $ orchHostname ),
81
81
$ regionIDs ,
82
82
),
83
+ "local " => new Local \LocalSiteProvider (
84
+ $ configFunction ("orch. " . self ::ORCH_LOCAL_DIRECTORY_PATH ),
85
+ ),
83
86
default => throw new \InvalidArgumentException ("Unknown orch type: $ orchType " ),
84
87
};
85
88
0 commit comments