path deployments
This commit is contained in:
@@ -46,6 +46,9 @@ class ProjectController extends Controller
|
||||
if (!$environment) {
|
||||
return redirect()->route('dashboard');
|
||||
}
|
||||
return view('project.resources', ['project' => $project, 'environment' => $environment]);
|
||||
return view('project.resources', [
|
||||
'project' => $project,
|
||||
'environment' => $environment
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,7 +73,11 @@ class General extends Component
|
||||
}
|
||||
public function submit()
|
||||
{
|
||||
$this->validate();
|
||||
$this->application->save();
|
||||
try {
|
||||
$this->validate();
|
||||
$this->application->save();
|
||||
} catch (\Exception $e) {
|
||||
return generalErrorHandler($e, $this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -383,9 +383,11 @@ COPY --from={$this->application->uuid}:{$this->git_commit}-build /app/{$this->ap
|
||||
$path = $url->getPath();
|
||||
$labels[] = 'traefik.enable=true';
|
||||
if ($path === '/') {
|
||||
$labels[] = "traefik.http.routers.container.rule=Host(`{$host}`) && PathPrefix(`{$path}`)";
|
||||
$labels[] = "traefik.http.routers.{$this->application->uuid}.rule=Host(`{$host}`) && Path(`{$path}`)";
|
||||
} else {
|
||||
$labels[] = "traefik.http.routers.container.rule=Host(`{$host}`) && PathPrefix(`{$path}`)";
|
||||
$labels[] = "traefik.http.routers.{$this->application->uuid}.rule=Host(`{$host}`) && PathPrefix(`{$path}`)";
|
||||
$labels[] = "traefik.http.routers.{$this->application->uuid}.middlewares={$this->application->uuid}-stripprefix";
|
||||
$labels[] = "traefik.http.middlewares.{$this->application->uuid}-stripprefix.stripprefix.prefixes={$path}";
|
||||
}
|
||||
}
|
||||
return $labels;
|
||||
|
||||
Reference in New Issue
Block a user