diff --git a/.env b/.env index f59620ec56..4416061925 100644 --- a/.env +++ b/.env @@ -39,6 +39,7 @@ _APP_FUNCTIONS_CONTAINERS=10 _APP_FUNCTIONS_CPUS=4 _APP_FUNCTIONS_MEMORY=2000 _APP_FUNCTIONS_MEMORY_SWAP=2000 +_APP_EXECUTOR_RUNTIME_NETWORK=appwrite_runtimes _APP_EXECUTOR_SECRET=a-random-secret _APP_MAINTENANCE_INTERVAL=86400 _APP_MAINTENANCE_RETENTION_EXECUTION=1209600 diff --git a/Dockerfile b/Dockerfile index 3ae4ef2175..a8ad505521 100755 --- a/Dockerfile +++ b/Dockerfile @@ -174,6 +174,7 @@ ENV _APP_SERVER=swoole \ _APP_FUNCTIONS_MEMORY=128 \ _APP_FUNCTIONS_MEMORY_SWAP=128 \ _APP_EXECUTOR_SECRET=a-random-secret \ + _APP_EXECUTOR_RUNTIME_NETWORK=appwrite_runtimes \ _APP_SETUP=self-hosted \ _APP_VERSION=$VERSION \ _APP_USAGE_STATS=enabled \ diff --git a/app/config/variables.php b/app/config/variables.php index 76dbf1cd5f..93f1243978 100644 --- a/app/config/variables.php +++ b/app/config/variables.php @@ -498,6 +498,15 @@ return [ 'question' => '', 'filter' => '' ], + [ + 'name' => '_APP_EXECUTOR_RUNTIME_NETWORK', + 'description' => 'The docker network used for communication between the executor and runtimes. Change this if you have altered the default network names.', + 'introduction' => '0.13.0', + 'default' => 'appwrite_runtimes', + 'required' => false, + 'question' => '', + 'filter' => '' + ], [ 'name' => '_APP_FUNCTIONS_ENVS', 'description' => 'Deprecated with 0.8.0, use \'_APP_FUNCTIONS_RUNTIMES\' instead!', diff --git a/app/executor.php b/app/executor.php index 135018fd27..7b7b20550f 100644 --- a/app/executor.php +++ b/app/executor.php @@ -301,7 +301,7 @@ function createRuntimeServer(string $functionId, string $projectId, string $depl } // Add to network - $orchestration->networkConnect($container, 'appwrite_runtimes'); + $orchestration->networkConnect($container, App::getEnv('_APP_EXECUTOR_RUNTIME_NETWORK', 'appwrite_runtimes')); $executionEnd = \microtime(true); diff --git a/app/views/install/compose.phtml b/app/views/install/compose.phtml index a4e8aeb0c0..f799a73e96 100644 --- a/app/views/install/compose.phtml +++ b/app/views/install/compose.phtml @@ -191,6 +191,7 @@ services: - _APP_FUNCTIONS_MEMORY - _APP_FUNCTIONS_MEMORY_SWAP - _APP_EXECUTOR_SECRET + - _APP_EXECUTOR_RUNTIME_NETWORK - _APP_USAGE_STATS - _APP_STATSD_HOST - _APP_STATSD_PORT diff --git a/docker-compose.yml b/docker-compose.yml index a0e62e108c..f649d9c2ab 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -423,6 +423,7 @@ services: - _APP_FUNCTIONS_MEMORY - _APP_FUNCTIONS_MEMORY_SWAP - _APP_EXECUTOR_SECRET + - _APP_EXECUTOR_RUNTIME_NETWORK - _APP_USAGE_STATS - _APP_STATSD_HOST - _APP_STATSD_PORT