1
0
Fork 0
mirror of synced 2024-06-02 19:04:49 +12:00

Implement network environment variable for the executor.

This commit is contained in:
Bradley Schofield 2022-01-26 10:23:30 +00:00
parent 4147faafdc
commit 4113644fba
6 changed files with 14 additions and 1 deletions

1
.env
View file

@ -40,6 +40,7 @@ _APP_FUNCTIONS_CPUS=4
_APP_FUNCTIONS_MEMORY=2000
_APP_FUNCTIONS_MEMORY_SWAP=2000
_APP_EXECUTOR_SECRET=a-randomly-generated-key
_APP_EXECUTOR_RUNTIME_NETWORK=appwrite_runtimes
_APP_MAINTENANCE_INTERVAL=86400
_APP_MAINTENANCE_RETENTION_EXECUTION=1209600
_APP_MAINTENANCE_RETENTION_ABUSE=86400

View file

@ -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 \

View file

@ -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!',

View file

@ -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);

View file

@ -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

View file

@ -391,6 +391,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