Compare commits

...
23 Commits
Author SHA1 Message Date
Christy Jacob 33fae9cce8 chore: update composer.json and composer.lock for utopia-php/queue and add appwrite-labs/php-amqplib
- Updated utopia-php/queue version to dev-feat-swoole-amqp-adapter and aliased it to 0.11.1 in composer.json.
- Added appwrite-labs/php-amqplib package with version 0.1.0 to composer.lock.
- Updated phpseclib/phpseclib to version 3.0.45 in composer.lock.
- Removed php-amqplib/php-amqplib from composer.lock.
2025-06-23 23:53:35 +04:00
Christy Jacob 917677a002 Merge branch '1.7.x' of github.com:appwrite/appwrite into 1.7.x 2025-06-23 23:51:40 +04:00
Christy Jacob 25d7b37ee0 Merge branches 'chore-update-env-var-used-for-domain' and '1.7.x' of github.com:appwrite/appwrite into 1.7.x 2025-06-20 17:33:52 +04:00
Khushboo Verma e65ed58ca4 Merge branch 'chore-update-env-var-used-for-domain' of github.com:appwrite/appwrite into chore-update-env-var-used-for-domain 2025-06-18 22:17:11 +05:30
Khushboo Verma 095159d89b Merge branch '1.7.x' into chore-update-env-var-used-for-domain 2025-06-18 22:15:19 +05:30
Christy JacobandGitHub 509392c48b Merge branch '1.7.x' into chore-update-env-var-used-for-domain 2025-06-18 13:44:04 +04:00
Khushboo Verma 520006864d Merge branch '1.7.x' into chore-update-env-var-used-for-domain 2025-06-18 11:07:25 +05:30
Khushboo Verma 5a3e44a36d Replace == with === 2025-06-18 11:06:35 +05:30
Khushboo Verma 22cda269b1 Update console 2025-06-17 18:37:02 +05:30
Khushboo Verma e8e7ee01b4 Merge branch 'fix-github-check-urls' into chore-update-env-var-used-for-domain 2025-06-17 14:01:50 +05:30
Khushboo Verma b7ffd2ca94 Revert some changes 2025-06-17 13:57:21 +05:30
Khushboo Verma 9356fb4cb4 Merge branch '1.7.x' into chore-update-env-var-used-for-domain 2025-06-17 12:16:37 +05:30
Khushboo Verma 41bc8272ff Add env var to docker-compose 2025-06-17 12:15:52 +05:30
Khushboo Verma ad60ff9972 Update url in general.php 2025-06-16 19:16:20 +05:30
Khushboo Verma 8c8abfdece Add var_dumps to debug 2025-06-16 18:47:50 +05:30
Khushboo Verma 5e345c0388 Revert some changes 2025-06-16 17:29:01 +05:30
Khushboo Verma 362618c5af Merge branch 'fix-github-check-urls' into chore-update-env-var-used-for-domain 2025-06-16 17:19:55 +05:30
Khushboo Verma cee6420fa2 Use env vars instead of request 2025-06-13 15:50:53 +05:30
Khushboo Verma 8bac836483 Merge branch 'fix-github-check-urls' into chore-update-env-var-used-for-domain 2025-06-13 15:18:31 +05:30
Khushboo Verma 01aa9fbb48 Merge branch 'chore-update-env-var-used-for-domain' of github.com:appwrite/appwrite into chore-update-env-var-used-for-domain 2025-06-13 15:18:17 +05:30
Khushboo VermaandGitHub d7c3100fe9 Merge branch '1.7.x' into chore-update-env-var-used-for-domain 2025-06-13 15:18:02 +05:30
Khushboo Verma 43f9254302 Merge branch '1.7.x' into chore-update-env-var-used-for-domain 2025-06-12 20:32:02 +05:30
Khushboo Verma 710b8bda56 Use _APP_CONSOLE_DOMAIN, if not found, then use _APP_DOMAIN 2025-06-12 17:27:21 +05:30
10 changed files with 146 additions and 121 deletions
+1
View File
@@ -22,6 +22,7 @@ _APP_OPTIONS_FORCE_HTTPS=disabled
_APP_OPTIONS_ROUTER_FORCE_HTTPS=disabled
_APP_OPENSSL_KEY_V1=your-secret-key
_APP_DOMAIN=traefik
_APP_CONSOLE_DOMAIN=localhost
_APP_DOMAIN_FUNCTIONS=functions.localhost
_APP_DOMAIN_SITES=sites.localhost
_APP_DOMAIN_TARGET_CNAME=test.localhost
+2 -7
View File
@@ -6,13 +6,8 @@ use Utopia\System\System;
* List of Appwrite Sites templates
*/
$protocol = System::getEnv('_APP_OPTIONS_FORCE_HTTPS') == 'disabled' ? 'http' : 'https';
$hostname = System::getEnv('_APP_DOMAIN');
// TODO: Development override
if (System::getEnv('_APP_ENV') === 'development') {
$hostname = 'localhost';
}
$protocol = System::getEnv('_APP_OPTIONS_FORCE_HTTPS') === 'disabled' ? 'http' : 'https';
$hostname = System::getEnv('_APP_CONSOLE_DOMAIN', System::getEnv('_APP_DOMAIN', ''));
$url = $protocol . '://' . $hostname;
+11 -5
View File
@@ -116,8 +116,10 @@ $createGitDeployments = function (GitHub $github, string $providerInstallationId
}
$commentStatus = $isAuthorized ? 'waiting' : 'failed';
$protocol = System::getEnv('_APP_OPTIONS_FORCE_HTTPS') === 'disabled' ? 'http' : 'https';
$hostname = System::getEnv('_APP_CONSOLE_DOMAIN', System::getEnv('_APP_DOMAIN', ''));
$authorizeUrl = $request->getProtocol() . '://' . $request->getHostname() . "/console/git/authorize-contributor?projectId={$projectId}&installationId={$installationId}&repositoryId={$repositoryId}&providerPullRequestId={$providerPullRequestId}";
$authorizeUrl = $protocol . '://' . $hostname . "/console/git/authorize-contributor?projectId={$projectId}&installationId={$installationId}&repositoryId={$repositoryId}&providerPullRequestId={$providerPullRequestId}";
$action = $isAuthorized ? ['type' => 'logs'] : ['type' => 'authorize', 'url' => $authorizeUrl];
@@ -378,7 +380,7 @@ $createGitDeployments = function (GitHub $github, string $providerInstallationId
}
$owner = $github->getOwnerName($providerInstallationId);
$providerTargetUrl = $request->getProtocol() . '://' . $request->getHostname() . "/console/project-$region-$projectId/$resourceCollection/$resourceType-$resourceId";
$providerTargetUrl = $protocol . '://' . $hostname . "/console/project-$region-$projectId/$resourceCollection/$resourceType-$resourceId";
$github->updateCommitStatus($repositoryName, $providerCommitHash, $owner, 'pending', $message, $providerTargetUrl, $name);
}
@@ -437,6 +439,8 @@ App::get('/v1/vcs/github/authorize')
]);
$appName = System::getEnv('_APP_VCS_GITHUB_APP_NAME');
$protocol = System::getEnv('_APP_OPTIONS_FORCE_HTTPS') === 'disabled' ? 'http' : 'https';
$hostname = System::getEnv('_APP_CONSOLE_DOMAIN', System::getEnv('_APP_DOMAIN', ''));
if (empty($appName)) {
throw new Exception(Exception::GENERAL_SERVER_ERROR, 'GitHub App name is not configured. Please configure VCS (Version Control System) variables in .env file.');
@@ -444,7 +448,7 @@ App::get('/v1/vcs/github/authorize')
$url = "https://github.com/apps/$appName/installations/new?" . \http_build_query([
'state' => $state,
'redirect_uri' => $request->getProtocol() . '://' . $request->getHostname() . "/v1/vcs/github/callback"
'redirect_uri' => $protocol . '://' . $hostname . "/v1/vcs/github/callback"
]);
$response
@@ -494,10 +498,12 @@ App::get('/v1/vcs/github/callback')
}
$region = $project->getAttribute('region', 'default');
$protocol = System::getEnv('_APP_OPTIONS_FORCE_HTTPS') === 'disabled' ? 'http' : 'https';
$hostname = System::getEnv('_APP_CONSOLE_DOMAIN', System::getEnv('_APP_DOMAIN', ''));
$defaultState = [
'success' => $request->getProtocol() . '://' . $request->getHostname() . "/console/project-$region-$projectId/settings/git-installations",
'failure' => $request->getProtocol() . '://' . $request->getHostname() . "/console/project-$region-$projectId/settings/git-installations",
'success' => $protocol . '://' . $hostname . "/console/project-$region-$projectId/settings/git-installations",
'failure' => $protocol . '://' . $hostname . "/console/project-$region-$projectId/settings/git-installations",
];
$state = \array_merge($defaultState, $state ?? []);
+3 -3
View File
@@ -76,7 +76,7 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw
}
$errorView = __DIR__ . '/../views/general/error.phtml';
$url = (System::getEnv('_APP_OPTIONS_FORCE_HTTPS') == 'disabled' ? 'http' : 'https') . '://' . System::getEnv('_APP_DOMAIN', '');
$url = (System::getEnv('_APP_OPTIONS_FORCE_HTTPS') == 'disabled' ? 'http' : 'https') . '://' . System::getEnv('_APP_CONSOLE_DOMAIN', System::getEnv('_APP_DOMAIN', ''));
if ($rule->isEmpty()) {
$appDomainFunctionsFallback = System::getEnv('_APP_DOMAIN_FUNCTIONS_FALLBACK', '');
@@ -262,7 +262,7 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw
}
if (!$authorized) {
$url = (System::getEnv('_APP_OPTIONS_FORCE_HTTPS') == 'disabled' ? 'http' : 'https') . "://" . System::getEnv('_APP_DOMAIN');
$url = (System::getEnv('_APP_OPTIONS_FORCE_HTTPS') == 'disabled' ? 'http' : 'https') . "://" . System::getEnv('_APP_CONSOLE_DOMAIN', System::getEnv('_APP_DOMAIN', ''));
$response
->addHeader('Cache-Control', 'no-store, no-cache, must-revalidate, max-age=0')
->addHeader('Pragma', 'no-cache')
@@ -448,7 +448,7 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw
$vars[$var->getAttribute('key')] = $var->getAttribute('value', '');
}
$protocol = System::getEnv('_APP_OPTIONS_FORCE_HTTPS') == 'disabled' ? 'http' : 'https';
$protocol = System::getEnv('_APP_OPTIONS_FORCE_HTTPS') === 'disabled' ? 'http' : 'https';
$hostname = System::getEnv('_APP_DOMAIN');
$endpoint = $protocol . '://' . $hostname . "/v1";
+1 -1
View File
@@ -15,7 +15,7 @@ $labelClass = '';
$buttons = [];
$protocol = System::getEnv('_APP_OPTIONS_FORCE_HTTPS') == 'disabled' ? 'http' : 'https';
$hostname = System::getEnv('_APP_DOMAIN');
$hostname = System::getEnv('_APP_CONSOLE_DOMAIN', System::getEnv('_APP_DOMAIN', ''));
// TODO: remove this later
if (System::getEnv('_APP_ENV') === 'development') {
$hostname = 'localhost';
+1 -1
View File
@@ -67,7 +67,7 @@
"utopia-php/platform": "0.7.*",
"utopia-php/pools": "0.8.*",
"utopia-php/preloader": "0.2.*",
"utopia-php/queue": "0.11.0",
"utopia-php/queue": "dev-feat-swoole-amqp-adapter as 0.11.1",
"utopia-php/registry": "0.5.*",
"utopia-php/storage": "0.18.*",
"utopia-php/swoole": "0.8.*",
Generated
+118 -97
View File
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "55bc52686a08d64930e6af7411ac0654",
"content-hash": "783e4b89e54e4d58f3c177c1a700da7c",
"packages": [
{
"name": "adhocore/jwt",
@@ -67,6 +67,99 @@
],
"time": "2025-02-18T01:00:50+00:00"
},
{
"name": "appwrite-labs/php-amqplib",
"version": "0.1.0",
"source": {
"type": "git",
"url": "https://github.com/appwrite-labs/php-amqplib.git",
"reference": "30d709df7510e784d16ad7a7f817d26fe79615a0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/appwrite-labs/php-amqplib/zipball/30d709df7510e784d16ad7a7f817d26fe79615a0",
"reference": "30d709df7510e784d16ad7a7f817d26fe79615a0",
"shasum": ""
},
"require": {
"ext-mbstring": "*",
"ext-sockets": "*",
"php": "^7.2||^8.0",
"phpseclib/phpseclib": "^2.0|^3.0"
},
"conflict": {
"php": "7.4.0 - 7.4.1"
},
"replace": {
"php-amqplib/php-amqplib": "self.version",
"videlalvaro/php-amqplib": "self.version"
},
"require-dev": {
"ext-curl": "*",
"nategood/httpful": "^0.2.20",
"phpunit/phpunit": "^7.5|^9.5",
"squizlabs/php_codesniffer": "^3.6",
"swoole/ide-helper": "^5.0"
},
"suggest": {
"ext-swoole": "For Swoole coroutine support"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.0-dev"
}
},
"autoload": {
"psr-4": {
"PhpAmqpLib\\": "PhpAmqpLib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"LGPL-2.1-or-later"
],
"authors": [
{
"name": "Appwrite Labs",
"email": "team@appwrite.io",
"role": "Fork Maintainer"
},
{
"name": "Alvaro Videla",
"role": "Original Maintainer"
},
{
"name": "Raúl Araya",
"email": "nubeiro@gmail.com",
"role": "Maintainer"
},
{
"name": "Luke Bakken",
"email": "luke@bakken.io",
"role": "Maintainer"
},
{
"name": "Ramūnas Dronga",
"email": "github@ramuno.lt",
"role": "Maintainer"
}
],
"description": "Fork of php-amqplib with Swoole coroutine support. A pure PHP implementation of the AMQP protocol tested against RabbitMQ.",
"homepage": "https://github.com/appwrite-labs/php-amqplib/",
"keywords": [
"async",
"coroutine",
"message",
"queue",
"rabbitmq",
"swoole"
],
"support": {
"source": "https://github.com/appwrite-labs/php-amqplib/tree/0.1.0"
},
"time": "2025-06-13T21:45:04+00:00"
},
{
"name": "appwrite/appwrite",
"version": "11.1.0",
@@ -1631,87 +1724,6 @@
},
"time": "2020-10-15T08:29:30+00:00"
},
{
"name": "php-amqplib/php-amqplib",
"version": "v3.7.3",
"source": {
"type": "git",
"url": "https://github.com/php-amqplib/php-amqplib.git",
"reference": "9f50fe69a9f1a19e2cb25596a354d705de36fe59"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-amqplib/php-amqplib/zipball/9f50fe69a9f1a19e2cb25596a354d705de36fe59",
"reference": "9f50fe69a9f1a19e2cb25596a354d705de36fe59",
"shasum": ""
},
"require": {
"ext-mbstring": "*",
"ext-sockets": "*",
"php": "^7.2||^8.0",
"phpseclib/phpseclib": "^2.0|^3.0"
},
"conflict": {
"php": "7.4.0 - 7.4.1"
},
"replace": {
"videlalvaro/php-amqplib": "self.version"
},
"require-dev": {
"ext-curl": "*",
"nategood/httpful": "^0.2.20",
"phpunit/phpunit": "^7.5|^9.5",
"squizlabs/php_codesniffer": "^3.6"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.0-dev"
}
},
"autoload": {
"psr-4": {
"PhpAmqpLib\\": "PhpAmqpLib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"LGPL-2.1-or-later"
],
"authors": [
{
"name": "Alvaro Videla",
"role": "Original Maintainer"
},
{
"name": "Raúl Araya",
"email": "nubeiro@gmail.com",
"role": "Maintainer"
},
{
"name": "Luke Bakken",
"email": "luke@bakken.io",
"role": "Maintainer"
},
{
"name": "Ramūnas Dronga",
"email": "github@ramuno.lt",
"role": "Maintainer"
}
],
"description": "Formerly videlalvaro/php-amqplib. This library is a pure PHP implementation of the AMQP protocol. It's been tested against RabbitMQ.",
"homepage": "https://github.com/php-amqplib/php-amqplib/",
"keywords": [
"message",
"queue",
"rabbitmq"
],
"support": {
"issues": "https://github.com/php-amqplib/php-amqplib/issues",
"source": "https://github.com/php-amqplib/php-amqplib/tree/v3.7.3"
},
"time": "2025-02-18T20:11:13+00:00"
},
{
"name": "php-http/discovery",
"version": "1.20.0",
@@ -1874,16 +1886,16 @@
},
{
"name": "phpseclib/phpseclib",
"version": "3.0.44",
"version": "3.0.45",
"source": {
"type": "git",
"url": "https://github.com/phpseclib/phpseclib.git",
"reference": "1d0b5e7e1434678411787c5a0535e68907cf82d9"
"reference": "bd81b90d5963c6b9d87de50357585375223f4dd8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/1d0b5e7e1434678411787c5a0535e68907cf82d9",
"reference": "1d0b5e7e1434678411787c5a0535e68907cf82d9",
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/bd81b90d5963c6b9d87de50357585375223f4dd8",
"reference": "bd81b90d5963c6b9d87de50357585375223f4dd8",
"shasum": ""
},
"require": {
@@ -1964,7 +1976,7 @@
],
"support": {
"issues": "https://github.com/phpseclib/phpseclib/issues",
"source": "https://github.com/phpseclib/phpseclib/tree/3.0.44"
"source": "https://github.com/phpseclib/phpseclib/tree/3.0.45"
},
"funding": [
{
@@ -1980,7 +1992,7 @@
"type": "tidelift"
}
],
"time": "2025-06-15T09:59:26+00:00"
"time": "2025-06-22T22:54:43+00:00"
},
{
"name": "psr/container",
@@ -4251,21 +4263,21 @@
},
{
"name": "utopia-php/queue",
"version": "0.11.0",
"version": "dev-feat-swoole-amqp-adapter",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/queue.git",
"reference": "06b5ced0eaed2ecc6aab6d8e1b4d96bff37a1ce5"
"reference": "baa8c074ce1d73769cab61d2a1c2c4a9e4f97896"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/queue/zipball/06b5ced0eaed2ecc6aab6d8e1b4d96bff37a1ce5",
"reference": "06b5ced0eaed2ecc6aab6d8e1b4d96bff37a1ce5",
"url": "https://api.github.com/repos/utopia-php/queue/zipball/baa8c074ce1d73769cab61d2a1c2c4a9e4f97896",
"reference": "baa8c074ce1d73769cab61d2a1c2c4a9e4f97896",
"shasum": ""
},
"require": {
"appwrite-labs/php-amqplib": "0.1.0",
"php": ">=8.3",
"php-amqplib/php-amqplib": "^3.7",
"utopia-php/cli": "0.15.*",
"utopia-php/fetch": "0.4.*",
"utopia-php/framework": "0.33.*",
@@ -4311,9 +4323,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/queue/issues",
"source": "https://github.com/utopia-php/queue/tree/0.11.0"
"source": "https://github.com/utopia-php/queue/tree/feat-swoole-amqp-adapter"
},
"time": "2025-05-30T09:52:38+00:00"
"time": "2025-06-23T19:50:06+00:00"
},
{
"name": "utopia-php/registry",
@@ -8231,9 +8243,18 @@
"time": "2024-03-07T20:33:40+00:00"
}
],
"aliases": [],
"aliases": [
{
"package": "utopia-php/queue",
"version": "dev-feat-swoole-amqp-adapter",
"alias": "0.11.1",
"alias_normalized": "0.11.1.0"
}
],
"minimum-stability": "stable",
"stability-flags": {},
"stability-flags": {
"utopia-php/queue": 20
},
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
+3 -1
View File
@@ -116,6 +116,7 @@ services:
- _APP_OPTIONS_ROUTER_FORCE_HTTPS
- _APP_OPENSSL_KEY_V1
- _APP_DOMAIN
- _APP_CONSOLE_DOMAIN
- _APP_DOMAIN_TARGET_CNAME
- _APP_DOMAIN_TARGET_AAAA
- _APP_DOMAIN_TARGET_A
@@ -213,7 +214,7 @@ services:
appwrite-console:
<<: *x-logging
container_name: appwrite-console
image: appwrite/console:6.0.41
image: appwrite/console:6.1.2
restart: unless-stopped
networks:
- appwrite
@@ -481,6 +482,7 @@ services:
- _APP_OPTIONS_FORCE_HTTPS
- _APP_OPTIONS_ROUTER_FORCE_HTTPS
- _APP_DOMAIN
- _APP_CONSOLE_DOMAIN
- _APP_STORAGE_DEVICE
- _APP_STORAGE_S3_ACCESS_KEY
- _APP_STORAGE_S3_SECRET
@@ -594,7 +594,7 @@ class Builds extends Action
]);
$protocol = System::getEnv('_APP_OPTIONS_FORCE_HTTPS') == 'disabled' ? 'http' : 'https';
$hostname = System::getEnv('_APP_DOMAIN');
$hostname = System::getEnv('_APP_CONSOLE_DOMAIN', System::getEnv('_APP_DOMAIN', ''));
$endpoint = $protocol . '://' . $hostname . "/v1";
// Appwrite vars
@@ -1440,7 +1440,7 @@ class Builds extends Action
$name = "{$resourceName} ({$projectName})";
$protocol = System::getEnv('_APP_OPTIONS_FORCE_HTTPS') == 'disabled' ? 'http' : 'https';
$hostname = System::getEnv('_APP_DOMAIN');
$hostname = System::getEnv('_APP_CONSOLE_DOMAIN', System::getEnv('_APP_DOMAIN', ''));
$projectId = $project->getId();
$region = $project->getAttribute('region', 'default');
+4 -4
View File
@@ -86,8 +86,8 @@ class Comment
$i = 0;
foreach ($projects as $projectId => $project) {
$protocol = System::getEnv('_APP_OPTIONS_FORCE_HTTPS') == 'disabled' ? 'http' : 'https';
$hostname = System::getEnv('_APP_CONSOLE_DOMAIN', System::getEnv('_APP_DOMAIN'));
$protocol = System::getEnv('_APP_OPTIONS_FORCE_HTTPS') === 'disabled' ? 'http' : 'https';
$hostname = System::getEnv('_APP_CONSOLE_DOMAIN', System::getEnv('_APP_DOMAIN', ''));
$text .= "## {$project['name']}\n\n";
$text .= "Project ID: `{$projectId}`\n\n";
@@ -200,8 +200,8 @@ class Comment
public function generatImage(string $pathLight, string $pathDark, string $alt, int $width): string
{
$protocol = System::getEnv('_APP_OPTIONS_FORCE_HTTPS') == 'disabled' ? 'http' : 'https';
$hostname = System::getEnv('_APP_CONSOLE_DOMAIN', System::getEnv('_APP_DOMAIN'));
$protocol = System::getEnv('_APP_OPTIONS_FORCE_HTTPS') === 'disabled' ? 'http' : 'https';
$hostname = System::getEnv('_APP_CONSOLE_DOMAIN', System::getEnv('_APP_DOMAIN', ''));
$imageLight = $protocol . '://' . $hostname . $pathLight;
$imageDark = $protocol . '://' . $hostname . $pathDark;