diff --git a/app/executor.php b/app/executor.php index 566f177471..d28123c224 100644 --- a/app/executor.php +++ b/app/executor.php @@ -141,7 +141,6 @@ App::post('/v1/runtimes') ->param('vars', [], new Assoc(), 'Environment Variables required for the build') ->param('commands', [], new ArrayList(new Text(0)), 'Commands required to build the container') ->param('runtime', '', new Text(128), 'Runtime for the cloud function') - ->param('network', '', new Text(128), 'Network to attach the container to') ->param('baseImage', '', new Text(128), 'Base image name of the runtime') ->param('entrypoint', '', new Text(256), 'Entrypoint of the code file', true) ->param('remove', false, new Boolean(), 'Remove a runtime after execution') @@ -149,8 +148,7 @@ App::post('/v1/runtimes') ->inject('orchestrationPool') ->inject('activeRuntimes') ->inject('response') - ->action(function (string $runtimeId, string $source, string $destination, array $vars, array $commands, string $runtime, string $network, string $baseImage, string $entrypoint, bool $remove, string $workdir, $orchestrationPool, $activeRuntimes, Response $response) { - + ->action(function (string $runtimeId, string $source, string $destination, array $vars, array $commands, string $runtime, string $baseImage, string $entrypoint, bool $remove, string $workdir, $orchestrationPool, $activeRuntimes, Response $response) { if ($activeRuntimes->exists($runtimeId)) { throw new Exception('Runtime already exists.', 409); } @@ -235,9 +233,7 @@ App::post('/v1/runtimes') throw new Exception('Failed to create build container', 500); } - if (!empty($network)) { - $orchestration->networkConnect($runtimeId, $network); - } + $orchestration->networkConnect($runtimeId, App::getEnv('_APP_EXECUTOR_RUNTIME_NETWORK', 'appwrite_runtimes')); /** * Execute any commands if they were provided diff --git a/src/Executor/Executor.php b/src/Executor/Executor.php index 1a96b3561b..fff322161f 100644 --- a/src/Executor/Executor.php +++ b/src/Executor/Executor.php @@ -59,7 +59,6 @@ class Executor string $entrypoint = '', string $workdir = '', string $destination = '', - string $network = '', array $vars = [], array $commands = [] ) { @@ -76,7 +75,6 @@ class Executor 'baseImage' => $baseImage, 'entrypoint' => $entrypoint, 'workdir' => $workdir, - 'network' => empty($network) ? App::getEnv('_APP_EXECUTOR_RUNTIME_NETWORK', 'appwrite_runtimes') : $network, 'vars' => $vars, 'remove' => $remove, 'commands' => $commands