From 8368ff0ffe991d5bc45bd835e4b5c9753d282786 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Fri, 11 Aug 2023 23:43:55 +0000 Subject: [PATCH 01/13] chore: cleanup dockerfile --- Dockerfile | 88 --------------------------------------------------- composer.lock | 73 +++++++++++++++++++++--------------------- 2 files changed, 37 insertions(+), 124 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1a55209208..6e9753b92e 100755 --- a/Dockerfile +++ b/Dockerfile @@ -33,97 +33,9 @@ FROM appwrite/base:0.2.2 as final LABEL maintainer="team@appwrite.io" -ARG VERSION=dev ARG DEBUG=false ENV DEBUG=$DEBUG -ENV DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker} -ENV DOCKER_COMPOSE_VERSION=v2.5.0 - -ENV _APP_SERVER=swoole \ - _APP_ENV=production \ - _APP_LOCALE=en \ - _APP_WORKER_PER_CORE= \ - _APP_DOMAIN=localhost \ - _APP_DOMAIN_TARGET=localhost \ - _APP_HOME=https://appwrite.io \ - _APP_EDITION=community \ - _APP_CONSOLE_WHITELIST_ROOT=enabled \ - _APP_CONSOLE_WHITELIST_EMAILS= \ - _APP_CONSOLE_WHITELIST_IPS= \ - _APP_SYSTEM_EMAIL_NAME= \ - _APP_SYSTEM_EMAIL_ADDRESS= \ - _APP_SYSTEM_RESPONSE_FORMAT= \ - _APP_SYSTEM_SECURITY_EMAIL_ADDRESS= \ - _APP_OPTIONS_ABUSE=enabled \ - _APP_OPTIONS_FORCE_HTTPS=disabled \ - _APP_OPENSSL_KEY_V1=your-secret-key \ - _APP_STORAGE_LIMIT=10000000 \ - _APP_STORAGE_ANTIVIRUS=enabled \ - _APP_STORAGE_ANTIVIRUS_HOST=clamav \ - _APP_STORAGE_ANTIVIRUS_PORT=3310 \ - _APP_STORAGE_DEVICE=Local \ - _APP_STORAGE_S3_ACCESS_KEY= \ - _APP_STORAGE_S3_SECRET= \ - _APP_STORAGE_S3_REGION= \ - _APP_STORAGE_S3_BUCKET= \ - _APP_STORAGE_DO_SPACES_ACCESS_KEY= \ - _APP_STORAGE_DO_SPACES_SECRET= \ - _APP_STORAGE_DO_SPACES_REGION= \ - _APP_STORAGE_DO_SPACES_BUCKET= \ - _APP_STORAGE_BACKBLAZE_ACCESS_KEY= \ - _APP_STORAGE_BACKBLAZE_SECRET= \ - _APP_STORAGE_BACKBLAZE_REGION= \ - _APP_STORAGE_BACKBLAZE_BUCKET= \ - _APP_STORAGE_LINODE_ACCESS_KEY= \ - _APP_STORAGE_LINODE_SECRET= \ - _APP_STORAGE_LINODE_REGION= \ - _APP_STORAGE_LINODE_BUCKET= \ - _APP_STORAGE_WASABI_ACCESS_KEY= \ - _APP_STORAGE_WASABI_SECRET= \ - _APP_STORAGE_WASABI_REGION= \ - _APP_STORAGE_WASABI_BUCKET= \ - _APP_REDIS_HOST=redis \ - _APP_REDIS_PORT=6379 \ - _APP_DB_HOST=mariadb \ - _APP_DB_PORT=3306 \ - _APP_DB_USER=root \ - _APP_DB_PASS=password \ - _APP_DB_SCHEMA=appwrite \ - _APP_INFLUXDB_HOST=influxdb \ - _APP_INFLUXDB_PORT=8086 \ - _APP_STATSD_HOST=telegraf \ - _APP_STATSD_PORT=8125 \ - _APP_SMTP_HOST= \ - _APP_SMTP_PORT= \ - _APP_SMTP_SECURE= \ - _APP_SMTP_USERNAME= \ - _APP_SMTP_PASSWORD= \ - _APP_SMS_PROVIDER= \ - _APP_SMS_FROM= \ - _APP_FUNCTIONS_SIZE_LIMIT=30000000 \ - _APP_FUNCTIONS_TIMEOUT=900 \ - _APP_FUNCTIONS_CONTAINERS=10 \ - _APP_FUNCTIONS_CPUS=1 \ - _APP_FUNCTIONS_MEMORY=128 \ - _APP_FUNCTIONS_MEMORY_SWAP=128 \ - _APP_EXECUTOR_SECRET=a-random-secret \ - _APP_EXECUTOR_HOST=http://appwrite-executor/v1 \ - _APP_EXECUTOR_RUNTIME_NETWORK=appwrite_runtimes \ - _APP_SETUP=self-hosted \ - _APP_VERSION=$VERSION \ - _APP_USAGE_STATS=enabled \ - _APP_USAGE_AGGREGATION_INTERVAL=30 \ - # 14 Days = 1209600 s - _APP_MAINTENANCE_RETENTION_EXECUTION=1209600 \ - _APP_MAINTENANCE_RETENTION_AUDIT=1209600 \ - # 1 Day = 86400 s - _APP_MAINTENANCE_RETENTION_ABUSE=86400 \ - _APP_MAINTENANCE_RETENTION_USAGE_HOURLY=8640000 \ - _APP_MAINTENANCE_INTERVAL=86400 \ - _APP_LOGGING_PROVIDER= \ - _APP_LOGGING_CONFIG= - RUN \ if [ "$DEBUG" == "true" ]; then \ apk add boost boost-dev; \ diff --git a/composer.lock b/composer.lock index 5e6640b9fb..fe2ef22cdb 100644 --- a/composer.lock +++ b/composer.lock @@ -607,16 +607,16 @@ }, { "name": "guzzlehttp/promises", - "version": "2.0.0", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "3a494dc7dc1d7d12e511890177ae2d0e6c107da6" + "reference": "111166291a0f8130081195ac4556a5587d7f1b5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/3a494dc7dc1d7d12e511890177ae2d0e6c107da6", - "reference": "3a494dc7dc1d7d12e511890177ae2d0e6c107da6", + "url": "https://api.github.com/repos/guzzle/promises/zipball/111166291a0f8130081195ac4556a5587d7f1b5d", + "reference": "111166291a0f8130081195ac4556a5587d7f1b5d", "shasum": "" }, "require": { @@ -670,7 +670,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/2.0.0" + "source": "https://github.com/guzzle/promises/tree/2.0.1" }, "funding": [ { @@ -686,20 +686,20 @@ "type": "tidelift" } ], - "time": "2023-05-21T13:50:22+00:00" + "time": "2023-08-03T15:11:55+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.5.0", + "version": "2.6.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "b635f279edd83fc275f822a1188157ffea568ff6" + "reference": "8bd7c33a0734ae1c5d074360512beb716bef3f77" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/b635f279edd83fc275f822a1188157ffea568ff6", - "reference": "b635f279edd83fc275f822a1188157ffea568ff6", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/8bd7c33a0734ae1c5d074360512beb716bef3f77", + "reference": "8bd7c33a0734ae1c5d074360512beb716bef3f77", "shasum": "" }, "require": { @@ -786,7 +786,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.5.0" + "source": "https://github.com/guzzle/psr7/tree/2.6.0" }, "funding": [ { @@ -802,7 +802,7 @@ "type": "tidelift" } ], - "time": "2023-04-17T16:11:26+00:00" + "time": "2023-08-03T15:06:02+00:00" }, { "name": "influxdb/influxdb-php", @@ -3791,16 +3791,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.22.1", + "version": "1.23.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "65c39594fbd8c67abfc68bb323f86447bab79cc0" + "reference": "846ae76eef31c6d7790fac9bc399ecee45160b26" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/65c39594fbd8c67abfc68bb323f86447bab79cc0", - "reference": "65c39594fbd8c67abfc68bb323f86447bab79cc0", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/846ae76eef31c6d7790fac9bc399ecee45160b26", + "reference": "846ae76eef31c6d7790fac9bc399ecee45160b26", "shasum": "" }, "require": { @@ -3832,22 +3832,22 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.22.1" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.23.1" }, - "time": "2023-06-29T20:46:06+00:00" + "time": "2023-08-03T16:32:59+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.26", + "version": "9.2.27", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1" + "reference": "b0a88255cb70d52653d80c890bd7f38740ea50d1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/443bc6912c9bd5b409254a40f4b0f4ced7c80ea1", - "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/b0a88255cb70d52653d80c890bd7f38740ea50d1", + "reference": "b0a88255cb70d52653d80c890bd7f38740ea50d1", "shasum": "" }, "require": { @@ -3903,7 +3903,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.26" + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.27" }, "funding": [ { @@ -3911,7 +3912,7 @@ "type": "github" } ], - "time": "2023-03-06T12:58:08+00:00" + "time": "2023-07-26T13:44:30+00:00" }, { "name": "phpunit/php-file-iterator", @@ -4763,16 +4764,16 @@ }, { "name": "sebastian/global-state", - "version": "5.0.5", + "version": "5.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" + "reference": "bde739e7565280bda77be70044ac1047bc007e34" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34", + "reference": "bde739e7565280bda77be70044ac1047bc007e34", "shasum": "" }, "require": { @@ -4815,7 +4816,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.6" }, "funding": [ { @@ -4823,7 +4824,7 @@ "type": "github" } ], - "time": "2022-02-14T08:28:10+00:00" + "time": "2023-08-02T09:26:13+00:00" }, { "name": "sebastian/lines-of-code", @@ -5586,16 +5587,16 @@ }, { "name": "twig/twig", - "version": "v3.6.1", + "version": "v3.7.0", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "7e7d5839d4bec168dfeef0ac66d5c5a2edbabffd" + "reference": "5cf942bbab3df42afa918caeba947f1b690af64b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/7e7d5839d4bec168dfeef0ac66d5c5a2edbabffd", - "reference": "7e7d5839d4bec168dfeef0ac66d5c5a2edbabffd", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/5cf942bbab3df42afa918caeba947f1b690af64b", + "reference": "5cf942bbab3df42afa918caeba947f1b690af64b", "shasum": "" }, "require": { @@ -5641,7 +5642,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.6.1" + "source": "https://github.com/twigphp/Twig/tree/v3.7.0" }, "funding": [ { @@ -5653,7 +5654,7 @@ "type": "tidelift" } ], - "time": "2023-06-08T12:52:13+00:00" + "time": "2023-07-26T07:16:09+00:00" } ], "aliases": [], From 96354098f10f77eeb18b45494a3a8c22359b97ca Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Fri, 11 Aug 2023 23:45:05 +0000 Subject: [PATCH 02/13] chore: cleanup dockerfile --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 6e9753b92e..f62b88b163 100755 --- a/Dockerfile +++ b/Dockerfile @@ -33,9 +33,12 @@ FROM appwrite/base:0.2.2 as final LABEL maintainer="team@appwrite.io" +ARG VERSION=dev ARG DEBUG=false ENV DEBUG=$DEBUG +ENV _APP_VERSION=$VERSION + RUN \ if [ "$DEBUG" == "true" ]; then \ apk add boost boost-dev; \ From 31191c0be83360d952c9bec4c37100a5b00113b9 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Fri, 11 Aug 2023 23:49:10 +0000 Subject: [PATCH 03/13] chore: cleanup dockerfile --- .env | 1 + Dockerfile | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.env b/.env index 372bfd7baa..6a399636d0 100644 --- a/.env +++ b/.env @@ -1,4 +1,5 @@ _APP_ENV=development +_APP_VERSION=dev _APP_LOCALE=en _APP_WORKER_PER_CORE=6 _APP_CONSOLE_WHITELIST_ROOT=disabled diff --git a/Dockerfile b/Dockerfile index f62b88b163..6e9753b92e 100755 --- a/Dockerfile +++ b/Dockerfile @@ -33,12 +33,9 @@ FROM appwrite/base:0.2.2 as final LABEL maintainer="team@appwrite.io" -ARG VERSION=dev ARG DEBUG=false ENV DEBUG=$DEBUG -ENV _APP_VERSION=$VERSION - RUN \ if [ "$DEBUG" == "true" ]; then \ apk add boost boost-dev; \ From d9307724db1896d45245fd18ee797d7cb03d1363 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Sun, 13 Aug 2023 13:34:51 +0000 Subject: [PATCH 04/13] feat: add missing variable to docker compose --- composer.lock | 12 ++++++------ docker-compose.yml | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index fe2ef22cdb..949c2f2b2a 100644 --- a/composer.lock +++ b/composer.lock @@ -3665,16 +3665,16 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.7.2", + "version": "1.7.3", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "b2fe4d22a5426f38e014855322200b97b5362c0d" + "reference": "3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/b2fe4d22a5426f38e014855322200b97b5362c0d", - "reference": "b2fe4d22a5426f38e014855322200b97b5362c0d", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419", + "reference": "3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419", "shasum": "" }, "require": { @@ -3717,9 +3717,9 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.7.2" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.7.3" }, - "time": "2023-05-30T18:13:47+00:00" + "time": "2023-08-12T11:01:26+00:00" }, { "name": "phpspec/prophecy", diff --git a/docker-compose.yml b/docker-compose.yml index ecb10b9eea..242d9129e8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -95,6 +95,7 @@ services: - -dopcache.preload=opcache.preload=/usr/src/code/app/preload.php environment: - _APP_ENV + - _APP_VERSION - _APP_WORKER_PER_CORE - _APP_LOCALE - _APP_CONSOLE_WHITELIST_ROOT From b0f5a0e67709d7f2c5f5e0c4c078ce6522c20366 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Sun, 13 Aug 2023 14:20:29 +0000 Subject: [PATCH 05/13] feat: add version to dockerfile --- Dockerfile | 3 +++ docker-compose.yml | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6e9753b92e..f62b88b163 100755 --- a/Dockerfile +++ b/Dockerfile @@ -33,9 +33,12 @@ FROM appwrite/base:0.2.2 as final LABEL maintainer="team@appwrite.io" +ARG VERSION=dev ARG DEBUG=false ENV DEBUG=$DEBUG +ENV _APP_VERSION=$VERSION + RUN \ if [ "$DEBUG" == "true" ]; then \ apk add boost boost-dev; \ diff --git a/docker-compose.yml b/docker-compose.yml index 242d9129e8..ecb10b9eea 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -95,7 +95,6 @@ services: - -dopcache.preload=opcache.preload=/usr/src/code/app/preload.php environment: - _APP_ENV - - _APP_VERSION - _APP_WORKER_PER_CORE - _APP_LOCALE - _APP_CONSOLE_WHITELIST_ROOT From 06c0b189f092d1bc831618375a7015016225efc5 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Sun, 13 Aug 2023 14:21:06 +0000 Subject: [PATCH 06/13] feat: add version to dockerfile --- .env | 1 - 1 file changed, 1 deletion(-) diff --git a/.env b/.env index 6a399636d0..372bfd7baa 100644 --- a/.env +++ b/.env @@ -1,5 +1,4 @@ _APP_ENV=development -_APP_VERSION=dev _APP_LOCALE=en _APP_WORKER_PER_CORE=6 _APP_CONSOLE_WHITELIST_ROOT=disabled From 61c054c20b39748459b878152f9f5dfc0fd0b1c3 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Fri, 1 Sep 2023 15:25:16 -0400 Subject: [PATCH 07/13] chore: update deps --- app/console | 2 +- composer.lock | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/console b/app/console index 9174d8f8cb..88b6d59051 160000 --- a/app/console +++ b/app/console @@ -1 +1 @@ -Subproject commit 9174d8f8cb584744dd7a53f69d324f490ee82ee3 +Subproject commit 88b6d59051992ed86183ee83d77bf678d1cb73bf diff --git a/composer.lock b/composer.lock index 8a3bf6d014..6e98aca893 100644 --- a/composer.lock +++ b/composer.lock @@ -3460,16 +3460,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "0.34.1", + "version": "0.34.2", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "81538d10abacd81350c265b516c72ef315116013" + "reference": "06ea25aace27790e42d57fdbc7ccf97e0b31a6ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/81538d10abacd81350c265b516c72ef315116013", - "reference": "81538d10abacd81350c265b516c72ef315116013", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/06ea25aace27790e42d57fdbc7ccf97e0b31a6ba", + "reference": "06ea25aace27790e42d57fdbc7ccf97e0b31a6ba", "shasum": "" }, "require": { @@ -3505,9 +3505,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/0.34.1" + "source": "https://github.com/appwrite/sdk-generator/tree/0.34.2" }, - "time": "2023-08-30T07:57:31+00:00" + "time": "2023-08-31T14:10:33+00:00" }, { "name": "doctrine/deprecations", From 3fd77bdda79b0a0638f0d035e1696442bdbf77f7 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Fri, 1 Sep 2023 15:29:30 -0400 Subject: [PATCH 08/13] chore: revert composer.lock --- composer.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index 6e98aca893..8a3bf6d014 100644 --- a/composer.lock +++ b/composer.lock @@ -3460,16 +3460,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "0.34.2", + "version": "0.34.1", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "06ea25aace27790e42d57fdbc7ccf97e0b31a6ba" + "reference": "81538d10abacd81350c265b516c72ef315116013" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/06ea25aace27790e42d57fdbc7ccf97e0b31a6ba", - "reference": "06ea25aace27790e42d57fdbc7ccf97e0b31a6ba", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/81538d10abacd81350c265b516c72ef315116013", + "reference": "81538d10abacd81350c265b516c72ef315116013", "shasum": "" }, "require": { @@ -3505,9 +3505,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/0.34.2" + "source": "https://github.com/appwrite/sdk-generator/tree/0.34.1" }, - "time": "2023-08-31T14:10:33+00:00" + "time": "2023-08-30T07:57:31+00:00" }, { "name": "doctrine/deprecations", From 31a7cca9061d4fa67651d636b83d8fd103025cd2 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Fri, 1 Sep 2023 17:08:51 -0400 Subject: [PATCH 09/13] chore: add missing env variable --- .env | 3 ++- docker-compose.yml | 1 + src/Appwrite/Platform/Tasks/Doctor.php | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.env b/.env index 6ef35b57c1..025f8ae8be 100644 --- a/.env +++ b/.env @@ -1,4 +1,5 @@ -_APP_ENV=development +_APP_ENV=production +_APP_HOME=https://appwrite.io _APP_LOCALE=en _APP_WORKER_PER_CORE=6 _APP_CONSOLE_WHITELIST_ROOT=disabled diff --git a/docker-compose.yml b/docker-compose.yml index b27c3581af..35326655b8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -95,6 +95,7 @@ services: - -dopcache.preload=opcache.preload=/usr/src/code/app/preload.php environment: - _APP_ENV + - _APP_HOME - _APP_WORKER_PER_CORE - _APP_LOCALE - _APP_CONSOLE_WHITELIST_ROOT diff --git a/src/Appwrite/Platform/Tasks/Doctor.php b/src/Appwrite/Platform/Tasks/Doctor.php index 9a6d6a2847..423dd78fe7 100644 --- a/src/Appwrite/Platform/Tasks/Doctor.php +++ b/src/Appwrite/Platform/Tasks/Doctor.php @@ -245,7 +245,7 @@ class Doctor extends Action try { if (App::isProduction()) { Console::log(''); - $version = \json_decode(@\file_get_contents(App::getEnv('_APP_HOME', 'http://localhost') . '/v1/health/version'), true); + $version = \json_decode(@\file_get_contents(App::getEnv('_APP_HOME', 'http://localhost') . '/version'), true); if ($version && isset($version['version'])) { if (\version_compare($version['version'], App::getEnv('_APP_VERSION', 'UNKNOWN')) === 0) { From 036b565f8f9d815ce9e34c4ee1d2aa0af21b0e87 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Fri, 1 Sep 2023 17:09:15 -0400 Subject: [PATCH 10/13] chore: add missing env variable --- .env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env b/.env index 025f8ae8be..3ad31d65f6 100644 --- a/.env +++ b/.env @@ -1,4 +1,4 @@ -_APP_ENV=production +_APP_ENV=development _APP_HOME=https://appwrite.io _APP_LOCALE=en _APP_WORKER_PER_CORE=6 From b3807e6e22c45da34cdb871076c13e081fc76d2d Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Fri, 1 Sep 2023 17:17:58 -0400 Subject: [PATCH 11/13] chore: move env variable to dockerfile --- .env | 1 - Dockerfile | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.env b/.env index 3ad31d65f6..6ef35b57c1 100644 --- a/.env +++ b/.env @@ -1,5 +1,4 @@ _APP_ENV=development -_APP_HOME=https://appwrite.io _APP_LOCALE=en _APP_WORKER_PER_CORE=6 _APP_CONSOLE_WHITELIST_ROOT=disabled diff --git a/Dockerfile b/Dockerfile index 0145c346b7..8cea481543 100755 --- a/Dockerfile +++ b/Dockerfile @@ -37,7 +37,8 @@ ARG VERSION=dev ARG DEBUG=false ENV DEBUG=$DEBUG -ENV _APP_VERSION=$VERSION +ENV _APP_VERSION=$VERSION \ + _APP_HOME=https://appwrite.io RUN \ if [ "$DEBUG" == "true" ]; then \ From fad4bfcb1cb72ff1addc4a051c6a651f45c537af Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Fri, 1 Sep 2023 17:18:52 -0400 Subject: [PATCH 12/13] chore: move env variable to dockerfile --- docker-compose.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 35326655b8..b27c3581af 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -95,7 +95,6 @@ services: - -dopcache.preload=opcache.preload=/usr/src/code/app/preload.php environment: - _APP_ENV - - _APP_HOME - _APP_WORKER_PER_CORE - _APP_LOCALE - _APP_CONSOLE_WHITELIST_ROOT From f4cba83072551e2f8cdcfd7bb3afd549ed0a300d Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Fri, 1 Sep 2023 18:46:49 -0400 Subject: [PATCH 13/13] chore: update default env variables --- app/config/variables.php | 2 +- composer.lock | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/config/variables.php b/app/config/variables.php index b39eb9c41d..410d8203a8 100644 --- a/app/config/variables.php +++ b/app/config/variables.php @@ -65,7 +65,7 @@ return [ 'name' => '_APP_DOMAIN_FUNCTIONS', 'description' => 'A domain to use for function preview URLs. Setting to empty turns off function preview URLs.', 'introduction' => '', - 'default' => '', + 'default' => 'functions.localhost', 'required' => false, 'question' => '', 'filter' => '' diff --git a/composer.lock b/composer.lock index 8a3bf6d014..6e98aca893 100644 --- a/composer.lock +++ b/composer.lock @@ -3460,16 +3460,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "0.34.1", + "version": "0.34.2", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "81538d10abacd81350c265b516c72ef315116013" + "reference": "06ea25aace27790e42d57fdbc7ccf97e0b31a6ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/81538d10abacd81350c265b516c72ef315116013", - "reference": "81538d10abacd81350c265b516c72ef315116013", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/06ea25aace27790e42d57fdbc7ccf97e0b31a6ba", + "reference": "06ea25aace27790e42d57fdbc7ccf97e0b31a6ba", "shasum": "" }, "require": { @@ -3505,9 +3505,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/0.34.1" + "source": "https://github.com/appwrite/sdk-generator/tree/0.34.2" }, - "time": "2023-08-30T07:57:31+00:00" + "time": "2023-08-31T14:10:33+00:00" }, { "name": "doctrine/deprecations",