Skip to content

Commit

Permalink
Merge pull request #69 from Nyholm/sub-dir
Browse files Browse the repository at this point in the history
Allow deployments in sub directory
  • Loading branch information
mnapoli authored Aug 27, 2024
2 parents cce0757 + b2eb2f5 commit 5b1f650
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/HandlerResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,10 @@ private function symfonyContainer(?string $bootstrapFile = null): ContainerInter
));
}

$projectDir = getenv('LAMBDA_TASK_ROOT') ?: null;

// Use the Symfony Runtime component to resolve the closure and get the PSR-11 container
$options = $_SERVER['APP_RUNTIME_OPTIONS'] ?? [];
if ($projectDir) {
$options['project_dir'] = $projectDir;
if (! isset($options['project_dir'])) {
$options['project_dir'] = dirname(__DIR__, 4);
}

$runtimeClass = $_SERVER['APP_RUNTIME'] ?? $_ENV['APP_RUNTIME'] ?? BrefRuntime::class;
Expand Down

0 comments on commit 5b1f650

Please sign in to comment.