diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index fc857638d8..e8a8781c81 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -1402,7 +1402,7 @@ App::post('/v1/functions/:functionId/executions') /** Execute function */ $executor = new Executor(App::getEnv('_APP_EXECUTOR_HOST')); try { - $command = 'npm start'; + $command = 'npm start'; // TODO: Custom for each runtime $executionResponse = $executor->createExecution( projectId: $project->getId(), deploymentId: $deployment->getId(), @@ -1416,7 +1416,7 @@ App::post('/v1/functions/:functionId/executions') path: $path, method: $method, headers: $headers, - commands: [ + startCommands: [ 'sh', '-c', 'cp /tmp/code.tar.gz /mnt/code/code.tar.gz && nohup helpers/start.sh "' . $command . '" &>/dev/null &' ] diff --git a/app/workers/builds.php b/app/workers/builds.php index d094d8c802..ca66812370 100644 --- a/app/workers/builds.php +++ b/app/workers/builds.php @@ -276,7 +276,7 @@ class BuildsV1 extends Worker entrypoint: $deployment->getAttribute('entrypoint'), destination: APP_STORAGE_BUILDS . "/app-{$project->getId()}", variables: $vars, - commands: [ + startCommands: [ 'sh', '-c', 'tar -zxf /tmp/code.tar.gz -C /mnt/code && helpers/build.sh "' . $command . '"' ], diff --git a/app/workers/functions.php b/app/workers/functions.php index df1ffa1ca1..caf64a8a94 100644 --- a/app/workers/functions.php +++ b/app/workers/functions.php @@ -167,7 +167,7 @@ Server::setResource('execute', function () { /** Execute function */ try { - $command = 'npm start'; + $command = 'npm start'; // TODO: Custom for each runtime $client = new Executor(App::getEnv('_APP_EXECUTOR_HOST')); $executionResponse = $client->createExecution( projectId: $project->getId(), @@ -182,7 +182,7 @@ Server::setResource('execute', function () { path: $path, method: $method, headers: $headers, - commands: [ + startCommands: [ 'sh', '-c', 'cp /tmp/code.tar.gz /mnt/code/code.tar.gz && nohup helpers/start.sh "' . $command . '" &>/dev/null &' ]