Improve ENV vars documentation
This commit is contained in:
parent
5c44a77eae
commit
6c6e1caefc
5 changed files with 79 additions and 69 deletions
4
.env
4
.env
|
@ -70,6 +70,8 @@ _APP_FUNCTIONS_TIMEOUT=900
|
||||||
_APP_FUNCTIONS_BUILD_TIMEOUT=900
|
_APP_FUNCTIONS_BUILD_TIMEOUT=900
|
||||||
_APP_FUNCTIONS_CPUS=1
|
_APP_FUNCTIONS_CPUS=1
|
||||||
_APP_FUNCTIONS_MEMORY=512
|
_APP_FUNCTIONS_MEMORY=512
|
||||||
|
OPR_EXECUTOR_INACTIVE_TRESHOLD=600
|
||||||
|
OPR_EXECUTOR_NETWORK=openruntimes-runtimes
|
||||||
_APP_EXECUTOR_SECRET=your-secret-key
|
_APP_EXECUTOR_SECRET=your-secret-key
|
||||||
_APP_EXECUTOR_HOST=http://exc1/v1
|
_APP_EXECUTOR_HOST=http://exc1/v1
|
||||||
_APP_FUNCTIONS_RUNTIMES=
|
_APP_FUNCTIONS_RUNTIMES=
|
||||||
|
@ -84,7 +86,5 @@ _APP_USAGE_STATS=enabled
|
||||||
_APP_LOGGING_PROVIDER=
|
_APP_LOGGING_PROVIDER=
|
||||||
_APP_LOGGING_CONFIG=
|
_APP_LOGGING_CONFIG=
|
||||||
OPR_EXECUTOR_CONNECTION_STORAGE=file://localhost
|
OPR_EXECUTOR_CONNECTION_STORAGE=file://localhost
|
||||||
OPR_EXECUTOR_INACTIVE_TRESHOLD=600
|
|
||||||
OPR_EXECUTOR_NETWORK=openruntimes-runtimes
|
|
||||||
OPR_EXECUTOR_DOCKER_HUB_USERNAME=
|
OPR_EXECUTOR_DOCKER_HUB_USERNAME=
|
||||||
OPR_EXECUTOR_DOCKER_HUB_PASSWORD=
|
OPR_EXECUTOR_DOCKER_HUB_PASSWORD=
|
10
Dockerfile
10
Dockerfile
|
@ -246,8 +246,10 @@ ENV _APP_SERVER=swoole \
|
||||||
_APP_SMS_FROM= \
|
_APP_SMS_FROM= \
|
||||||
_APP_FUNCTIONS_SIZE_LIMIT=30000000 \
|
_APP_FUNCTIONS_SIZE_LIMIT=30000000 \
|
||||||
_APP_FUNCTIONS_TIMEOUT=900 \
|
_APP_FUNCTIONS_TIMEOUT=900 \
|
||||||
|
_APP_FUNCTIONS_CPUS=1 \
|
||||||
|
_APP_FUNCTIONS_MEMORY=128 \
|
||||||
_APP_EXECUTOR_SECRET=a-random-secret \
|
_APP_EXECUTOR_SECRET=a-random-secret \
|
||||||
_APP_EXECUTOR_HOST=http://appwrite-executor/v1 \
|
_APP_EXECUTOR_HOST=http://exc1/v1 \
|
||||||
_APP_SETUP=self-hosted \
|
_APP_SETUP=self-hosted \
|
||||||
_APP_VERSION=$VERSION \
|
_APP_VERSION=$VERSION \
|
||||||
_APP_USAGE_STATS=enabled \
|
_APP_USAGE_STATS=enabled \
|
||||||
|
@ -260,7 +262,11 @@ ENV _APP_SERVER=swoole \
|
||||||
_APP_MAINTENANCE_RETENTION_ABUSE=86400 \
|
_APP_MAINTENANCE_RETENTION_ABUSE=86400 \
|
||||||
_APP_MAINTENANCE_INTERVAL=86400 \
|
_APP_MAINTENANCE_INTERVAL=86400 \
|
||||||
_APP_LOGGING_PROVIDER= \
|
_APP_LOGGING_PROVIDER= \
|
||||||
_APP_LOGGING_CONFIG=
|
OPR_EXECUTOR_CONNECTION_STORAGE=file://localhost \
|
||||||
|
OPR_EXECUTOR_INACTIVE_TRESHOLD=600 \
|
||||||
|
OPR_EXECUTOR_NETWORK=openruntimes-runtimes \
|
||||||
|
OPR_EXECUTOR_DOCKER_HUB_USERNAME= \
|
||||||
|
OPR_EXECUTOR_DOCKER_HUB_PASSWORD=
|
||||||
|
|
||||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||||
|
|
||||||
|
|
|
@ -701,7 +701,7 @@ return [
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'name' => '_APP_FUNCTIONS_CONTAINERS',
|
'name' => '_APP_FUNCTIONS_CONTAINERS',
|
||||||
'description' => 'Deprecated since 1.1.0. Use Open Runtimes Executor instead. The maximum number of containers Appwrite is allowed to keep alive in the background for function environments. Running containers allow faster execution time as there is no need to recreate each container every time a function gets executed. The default value is 10.',
|
'description' => 'Deprecated since 1.2.0. Runtimes now timeout by inactivity using \'OPR_EXECUTOR_INACTIVE_TRESHOLD\'.',
|
||||||
'introduction' => '0.7.0',
|
'introduction' => '0.7.0',
|
||||||
'default' => '10',
|
'default' => '10',
|
||||||
'required' => false,
|
'required' => false,
|
||||||
|
@ -710,7 +710,7 @@ return [
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'name' => '_APP_FUNCTIONS_CPUS',
|
'name' => '_APP_FUNCTIONS_CPUS',
|
||||||
'description' => 'Deprecated since 1.1.0. Use Open Runtimes Executor instead. The maximum number of CPU core a single cloud function is allowed to use. Please note that setting a value higher than available cores will result in a function error, which might result in an error. The default value is empty. When it\'s empty, CPU limit will be disabled.',
|
'description' => 'The maximum number of CPU core a single cloud function is allowed to use. Please note that setting a value higher than available cores will result in a function error, which might result in an error. The default value is empty. When it\'s empty, CPU limit will be disabled.',
|
||||||
'introduction' => '0.7.0',
|
'introduction' => '0.7.0',
|
||||||
'default' => '0',
|
'default' => '0',
|
||||||
'required' => false,
|
'required' => false,
|
||||||
|
@ -719,7 +719,7 @@ return [
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'name' => '_APP_FUNCTIONS_MEMORY',
|
'name' => '_APP_FUNCTIONS_MEMORY',
|
||||||
'description' => 'Deprecated since 1.1.0. Use Open Runtimes Executor instead. The maximum amount of memory a single cloud function is allowed to use in megabytes. The default value is empty. When it\'s empty, memory limit will be disabled.',
|
'description' => 'The maximum amount of memory a single cloud function is allowed to use in megabytes. The default value is empty. When it\'s empty, memory limit will be disabled.',
|
||||||
'introduction' => '0.7.0',
|
'introduction' => '0.7.0',
|
||||||
'default' => '0',
|
'default' => '0',
|
||||||
'required' => false,
|
'required' => false,
|
||||||
|
@ -728,7 +728,7 @@ return [
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'name' => '_APP_FUNCTIONS_MEMORY_SWAP',
|
'name' => '_APP_FUNCTIONS_MEMORY_SWAP',
|
||||||
'description' => 'Deprecated since 1.1.0. Use Open Runtimes Executor instead. The maximum amount of swap memory a single cloud function is allowed to use in megabytes. The default value is empty. When it\'s empty, swap memory limit will be disabled.',
|
'description' => 'Deprecated since 1.2.0. High use of swap memory is not recommended to preserve harddrive health.',
|
||||||
'introduction' => '0.7.0',
|
'introduction' => '0.7.0',
|
||||||
'default' => '0',
|
'default' => '0',
|
||||||
'required' => false,
|
'required' => false,
|
||||||
|
@ -782,7 +782,7 @@ return [
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'name' => '_APP_FUNCTIONS_INACTIVE_THRESHOLD',
|
'name' => '_APP_FUNCTIONS_INACTIVE_THRESHOLD',
|
||||||
'description' => 'Deprecated since 1.1.0. Use Open Runtimes Executor instead. The minimum time a function can be inactive before it\'s container is shutdown and put to sleep. The default value is 60 seconds',
|
'description' => 'Deprecated with 1.2.0, use \'OPR_EXECUTOR_INACTIVE_TRESHOLD\' instead!',
|
||||||
'introduction' => '0.13.0',
|
'introduction' => '0.13.0',
|
||||||
'default' => '60',
|
'default' => '60',
|
||||||
'required' => false,
|
'required' => false,
|
||||||
|
@ -791,7 +791,7 @@ return [
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'name' => 'DOCKERHUB_PULL_USERNAME',
|
'name' => 'DOCKERHUB_PULL_USERNAME',
|
||||||
'description' => 'Deprecated since 1.1.0. Use Open Runtimes Executor instead. The username for hub.docker.com. This variable is used to pull images from hub.docker.com.',
|
'description' => 'Deprecated with 1.2.0, use \'OPR_EXECUTOR_DOCKER_HUB_USERNAME\' instead!',
|
||||||
'introduction' => '0.10.0',
|
'introduction' => '0.10.0',
|
||||||
'default' => '',
|
'default' => '',
|
||||||
'required' => false,
|
'required' => false,
|
||||||
|
@ -800,7 +800,7 @@ return [
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'name' => 'DOCKERHUB_PULL_PASSWORD',
|
'name' => 'DOCKERHUB_PULL_PASSWORD',
|
||||||
'description' => 'Deprecated since 1.1.0. Use Open Runtimes Executor instead. The password for hub.docker.com. This variable is used to pull images from hub.docker.com.',
|
'description' => 'Deprecated with 1.2.0, use \'OPR_EXECUTOR_DOCKER_HUB_PASSWORD\' instead!',
|
||||||
'introduction' => '0.10.0',
|
'introduction' => '0.10.0',
|
||||||
'default' => '',
|
'default' => '',
|
||||||
'required' => false,
|
'required' => false,
|
||||||
|
@ -809,7 +809,7 @@ return [
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'name' => 'DOCKERHUB_PULL_EMAIL',
|
'name' => 'DOCKERHUB_PULL_EMAIL',
|
||||||
'description' => 'Deprecated since 1.1.0. Use Open Runtimes Executor instead. The email for hub.docker.com. This variable is used to pull images from hub.docker.com.',
|
'description' => 'Deprecated since 1.2.0. Email is no longer needed.',
|
||||||
'introduction' => '0.10.0',
|
'introduction' => '0.10.0',
|
||||||
'default' => '',
|
'default' => '',
|
||||||
'required' => false,
|
'required' => false,
|
||||||
|
@ -818,13 +818,58 @@ return [
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'name' => 'OPEN_RUNTIMES_NETWORK',
|
'name' => 'OPEN_RUNTIMES_NETWORK',
|
||||||
'description' => 'Deprecated since 1.1.0. Use Open Runtimes Executor instead. The docker network used for communication between the executor and runtimes. Change this if you have altered the default network names.',
|
'description' => 'Deprecated with 1.2.0, use \'OPR_EXECUTOR_NETWORK\' instead!',
|
||||||
'introduction' => '0.13.0',
|
'introduction' => '0.13.0',
|
||||||
'default' => 'appwrite_runtimes',
|
'default' => 'appwrite_runtimes',
|
||||||
'required' => false,
|
'required' => false,
|
||||||
'question' => '',
|
'question' => '',
|
||||||
'filter' => ''
|
'filter' => ''
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
'name' => 'OPR_EXECUTOR_INACTIVE_TRESHOLD',
|
||||||
|
'description' => 'The minimum time a function can be inactive before it\'s container is shutdown and put to sleep. The default value is 60 seconds',
|
||||||
|
'introduction' => '1.2.0',
|
||||||
|
'default' => '60',
|
||||||
|
'required' => false,
|
||||||
|
'question' => '',
|
||||||
|
'filter' => ''
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'OPR_EXECUTOR_NETWORK',
|
||||||
|
'description' => 'The docker network used for communication between the executor and runtimes. Change this if you have altered the default network names.',
|
||||||
|
'introduction' => '1.2.0',
|
||||||
|
'default' => 'appwrite_runtimes',
|
||||||
|
'required' => false,
|
||||||
|
'question' => '',
|
||||||
|
'filter' => ''
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'OPR_EXECUTOR_DOCKER_HUB_USERNAME',
|
||||||
|
'description' => 'The username for hub.docker.com. This variable is used to pull images from hub.docker.com.',
|
||||||
|
'introduction' => '1.2.0',
|
||||||
|
'default' => '',
|
||||||
|
'required' => false,
|
||||||
|
'question' => '',
|
||||||
|
'filter' => ''
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'OPR_EXECUTOR_DOCKER_HUB_PASSWORD',
|
||||||
|
'description' => 'The password for hub.docker.com. This variable is used to pull images from hub.docker.com.',
|
||||||
|
'introduction' => '1.2.0',
|
||||||
|
'default' => '',
|
||||||
|
'required' => false,
|
||||||
|
'question' => '',
|
||||||
|
'filter' => ''
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'OPR_EXECUTOR_CONNECTION_STORAGE',
|
||||||
|
'description' => 'DSN record of storage driver where Open Runtimes Executor stores output of Appwrite Function Deployment builds.',
|
||||||
|
'introduction' => '1.2.0',
|
||||||
|
'default' => '',
|
||||||
|
'required' => false,
|
||||||
|
'question' => '',
|
||||||
|
'filter' => ''
|
||||||
|
]
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
|
|
@ -66,7 +66,7 @@ services:
|
||||||
- appwrite-cache:/storage/cache:rw
|
- appwrite-cache:/storage/cache:rw
|
||||||
- appwrite-config:/storage/config:rw
|
- appwrite-config:/storage/config:rw
|
||||||
- appwrite-certificates:/storage/certificates:rw
|
- appwrite-certificates:/storage/certificates:rw
|
||||||
- appwrite-functions:/storage/functions:rw
|
- openruntimes-functions:/storage/functions:rw
|
||||||
depends_on:
|
depends_on:
|
||||||
- mariadb
|
- mariadb
|
||||||
- redis
|
- redis
|
||||||
|
@ -259,8 +259,8 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- appwrite-uploads:/storage/uploads:rw
|
- appwrite-uploads:/storage/uploads:rw
|
||||||
- appwrite-cache:/storage/cache:rw
|
- appwrite-cache:/storage/cache:rw
|
||||||
- appwrite-functions:/storage/functions:rw
|
- openruntimes-functions:/storage/functions:rw
|
||||||
- appwrite-builds:/storage/builds:rw
|
- openruntimes-builds:/storage/builds:rw
|
||||||
- appwrite-certificates:/storage/certificates:rw
|
- appwrite-certificates:/storage/certificates:rw
|
||||||
environment:
|
environment:
|
||||||
- _APP_ENV
|
- _APP_ENV
|
||||||
|
@ -637,8 +637,13 @@ services:
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
gateway:
|
gateway:
|
||||||
|
name: gateway
|
||||||
appwrite:
|
appwrite:
|
||||||
runtimes:
|
name: appwrite
|
||||||
|
openruntimes-runtimes:
|
||||||
|
name: openruntimes-runtimes
|
||||||
|
openruntimes-executors:
|
||||||
|
name: openruntimes-executors
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
appwrite-mariadb:
|
appwrite-mariadb:
|
||||||
|
@ -646,7 +651,7 @@ volumes:
|
||||||
appwrite-cache:
|
appwrite-cache:
|
||||||
appwrite-uploads:
|
appwrite-uploads:
|
||||||
appwrite-certificates:
|
appwrite-certificates:
|
||||||
appwrite-functions:
|
|
||||||
appwrite-builds:
|
|
||||||
appwrite-influxdb:
|
appwrite-influxdb:
|
||||||
appwrite-config:
|
appwrite-config:
|
||||||
|
openruntimes-functions:
|
||||||
|
openruntimes-builds:
|
||||||
|
|
|
@ -690,55 +690,9 @@ services:
|
||||||
hostname: exc1
|
hostname: exc1
|
||||||
<<: *x-logging
|
<<: *x-logging
|
||||||
stop_signal: SIGINT
|
stop_signal: SIGINT
|
||||||
image: openruntimes/executor:0.1.1
|
image: openruntimes/executor:0.1.3
|
||||||
networks:
|
|
||||||
# - appwrite # If not using OPR proxy, uncomment this
|
|
||||||
- openruntimes-executors
|
|
||||||
- openruntimes-runtimes
|
|
||||||
volumes:
|
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
|
||||||
- openruntimes-builds:/storage/builds:rw
|
|
||||||
- openruntimes-functions:/storage/functions:rw
|
|
||||||
- /tmp:/tmp:rw
|
|
||||||
environment:
|
|
||||||
- OPR_EXECUTOR_CONNECTION_STORAGE
|
|
||||||
- OPR_EXECUTOR_INACTIVE_TRESHOLD
|
|
||||||
- OPR_EXECUTOR_NETWORK
|
|
||||||
- OPR_EXECUTOR_DOCKER_HUB_USERNAME
|
|
||||||
- OPR_EXECUTOR_DOCKER_HUB_PASSWORD
|
|
||||||
- OPR_EXECUTOR_ENV=$_APP_ENV
|
|
||||||
- OPR_EXECUTOR_RUNTIMES=$_APP_FUNCTIONS_RUNTIMES
|
|
||||||
- OPR_EXECUTOR_SECRET=$OPR_PROXY_EXECUTOR_SECRET # If not using OPR proxy, set to $_APP_EXECUTOR_SECRET
|
|
||||||
- OPR_EXECUTOR_LOGGING_PROVIDER=$_APP_LOGGING_PROVIDER
|
|
||||||
- OPR_EXECUTOR_LOGGING_CONFIG=$_APP_LOGGING_CONFIG
|
|
||||||
|
|
||||||
openruntimes-proxy:
|
|
||||||
container_name: openruntimes-proxy
|
|
||||||
hostname: proxy1
|
|
||||||
<<: *x-logging
|
|
||||||
image: openruntimes/proxy:0.2.2
|
|
||||||
networks:
|
networks:
|
||||||
- appwrite
|
- appwrite
|
||||||
- openruntimes-executors
|
|
||||||
environment:
|
|
||||||
- OPR_PROXY_ALGORITHM
|
|
||||||
- OPR_PROXY_EXECUTORS
|
|
||||||
- OPR_PROXY_HEALTHCHECK
|
|
||||||
- OPR_PROXY_HEALTHCHECK_INTERVAL
|
|
||||||
- OPR_PROXY_EXECUTOR_SECRET
|
|
||||||
- OPR_PROXY_ENV=$_APP_ENV
|
|
||||||
- OPR_PROXY_SECRET=$_APP_EXECUTOR_SECRET
|
|
||||||
- OPR_PROXY_LOGGING_PROVIDER=$_APP_LOGGING_PROVIDER
|
|
||||||
- OPR_PROXY_LOGGING_CONFIG=$_APP_LOGGING_CONFIG
|
|
||||||
|
|
||||||
openruntimes-executor2:
|
|
||||||
container_name: openruntimes-executor2
|
|
||||||
hostname: exc2
|
|
||||||
<<: *x-logging
|
|
||||||
stop_signal: SIGINT
|
|
||||||
image: openruntimes/executor:0.1.1
|
|
||||||
networks:
|
|
||||||
- openruntimes-executors
|
|
||||||
- openruntimes-runtimes
|
- openruntimes-runtimes
|
||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
@ -753,7 +707,7 @@ services:
|
||||||
- OPR_EXECUTOR_DOCKER_HUB_PASSWORD
|
- OPR_EXECUTOR_DOCKER_HUB_PASSWORD
|
||||||
- OPR_EXECUTOR_ENV=$_APP_ENV
|
- OPR_EXECUTOR_ENV=$_APP_ENV
|
||||||
- OPR_EXECUTOR_RUNTIMES=$_APP_FUNCTIONS_RUNTIMES
|
- OPR_EXECUTOR_RUNTIMES=$_APP_FUNCTIONS_RUNTIMES
|
||||||
- OPR_EXECUTOR_SECRET=$OPR_PROXY_EXECUTOR_SECRET
|
- OPR_EXECUTOR_SECRET=$_APP_EXECUTOR_SECRET
|
||||||
- OPR_EXECUTOR_LOGGING_PROVIDER=$_APP_LOGGING_PROVIDER
|
- OPR_EXECUTOR_LOGGING_PROVIDER=$_APP_LOGGING_PROVIDER
|
||||||
- OPR_EXECUTOR_LOGGING_CONFIG=$_APP_LOGGING_CONFIG
|
- OPR_EXECUTOR_LOGGING_CONFIG=$_APP_LOGGING_CONFIG
|
||||||
|
|
||||||
|
@ -919,11 +873,11 @@ services:
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
gateway:
|
gateway:
|
||||||
|
name: gateway
|
||||||
appwrite:
|
appwrite:
|
||||||
|
name: appwrite
|
||||||
openruntimes-runtimes:
|
openruntimes-runtimes:
|
||||||
name: openruntimes-runtimes
|
name: openruntimes-runtimes
|
||||||
openruntimes-executors:
|
|
||||||
name: openruntimes-executors
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
appwrite-mariadb:
|
appwrite-mariadb:
|
||||||
|
|
Loading…
Reference in a new issue