diff --git a/README.md b/README.md index 5beb066..9772624 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,8 @@ volumes: > Notice we added bind to local `./functions` directory. That is only nessessary for this getting started, since we will be executing our custom function. +> On startup, executor looks up its own container by hostname to connect it to the runtime networks, and exits if the hostname is not part of any container name. In the example above, `executor` is part of `openruntimes-executor`, so the lookup succeeds; using the full container name as the hostname avoids relying on a partial match. + 3. Create `.env` file: ``` diff --git a/app/http.php b/app/http.php index 3d38724..3e9c51a 100644 --- a/app/http.php +++ b/app/http.php @@ -40,7 +40,8 @@ /* Fetch own container information */ $hostname = gethostname() ?: throw new \RuntimeException('Could not determine hostname'); - $selfContainer = $orchestration->list(['name' => $hostname])[0] ?? throw new \RuntimeException('Own container not found'); + $selfContainer = $orchestration->list(['name' => $hostname])[0] + ?? throw new \RuntimeException(sprintf('Own container not found for hostname "%s". Set the executor hostname to its container name.', $hostname)); /* Create desired networks if they don't exist */ $network->setup(