mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 09:28:40 +00:00
Merge branch 'feat-sites' into feat-all-rules-in-proxy
This commit is contained in:
commit
e87fe7467e
3 changed files with 21 additions and 24 deletions
|
|
@ -145,33 +145,25 @@ return [
|
||||||
'variables' => [
|
'variables' => [
|
||||||
[
|
[
|
||||||
'name' => 'PUBLIC_APPWRITE_ENDPOINT',
|
'name' => 'PUBLIC_APPWRITE_ENDPOINT',
|
||||||
'description' => 'Endpoint of Appwrite server.',
|
'description' => 'Endpoint of Appwrite server',
|
||||||
'value' => 'https://cloud.appwrite.io/v1',
|
'value' => '{apiEndpoint}',
|
||||||
'placeholder' => 'https://cloud.appwrite.io/v1',
|
'placeholder' => 'https://cloud.appwrite.io/v1',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'type' => 'text'
|
'type' => 'text'
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'name' => 'PUBLIC_APPWRITE_PROJECT_ID',
|
'name' => 'PUBLIC_APPWRITE_PROJECT_ID',
|
||||||
'description' => 'Your Appwrite project ID.',
|
'description' => 'Your Appwrite project ID',
|
||||||
'value' => '',
|
'value' => '{projectId}',
|
||||||
'placeholder' => '67ab5b6d000db4f5f59d',
|
'placeholder' => '{projectId}',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'type' => 'text'
|
'type' => 'text'
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'name' => 'PUBLIC_APPWRITE_PROJECT_NAME',
|
'name' => 'PUBLIC_APPWRITE_PROJECT_NAME',
|
||||||
'description' => 'Your Appwrite project name.',
|
'description' => 'Your Appwrite project name',
|
||||||
'value' => '',
|
'value' => '{projectName}',
|
||||||
'placeholder' => 'My project',
|
'placeholder' => '{projectName}',
|
||||||
'required' => true,
|
|
||||||
'type' => 'text'
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'name' => 'PUBLIC_APPWRITE_VERSION',
|
|
||||||
'description' => 'Version of Appwrite server.',
|
|
||||||
'value' => '1.7.0',
|
|
||||||
'placeholder' => '1.7.0',
|
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'type' => 'text'
|
'type' => 'text'
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -204,7 +204,7 @@ services:
|
||||||
appwrite-console:
|
appwrite-console:
|
||||||
<<: *x-logging
|
<<: *x-logging
|
||||||
container_name: appwrite-console
|
container_name: appwrite-console
|
||||||
image: appwrite/console:5.3.0-sites-rc.5
|
image: appwrite/console:5.3.0-sites-rc.6
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
- appwrite
|
- appwrite
|
||||||
|
|
|
||||||
|
|
@ -869,22 +869,27 @@ class Builds extends Action
|
||||||
} elseif ($resource->getCollection() === 'sites') {
|
} elseif ($resource->getCollection() === 'sites') {
|
||||||
$commands = [];
|
$commands = [];
|
||||||
|
|
||||||
$commands[] = $deployment->getAttribute('installCommand', '');
|
|
||||||
$commands[] = $deployment->getAttribute('buildCommand', '');
|
|
||||||
|
|
||||||
$frameworks = Config::getParam('frameworks', []);
|
$frameworks = Config::getParam('frameworks', []);
|
||||||
$framework = $frameworks[$resource->getAttribute('framework', '')] ?? null;
|
$framework = $frameworks[$resource->getAttribute('framework', '')] ?? null;
|
||||||
|
|
||||||
|
$envCommand = '';
|
||||||
|
$bundleCommand = '';
|
||||||
|
|
||||||
if (!is_null($framework)) {
|
if (!is_null($framework)) {
|
||||||
$adapter = ($framework['adapters'] ?? [])[$resource->getAttribute('adapter', '')] ?? null;
|
$adapter = ($framework['adapters'] ?? [])[$resource->getAttribute('adapter', '')] ?? null;
|
||||||
if (!is_null($adapter) && isset($adapter['bundleCommand'])) {
|
|
||||||
$commands[] = $adapter['bundleCommand'];
|
|
||||||
}
|
|
||||||
if (!is_null($adapter) && isset($adapter['envCommand'])) {
|
if (!is_null($adapter) && isset($adapter['envCommand'])) {
|
||||||
$commands[] = $adapter['envCommand'];
|
$envCommand = $adapter['envCommand'];
|
||||||
|
}
|
||||||
|
if (!is_null($adapter) && isset($adapter['bundleCommand'])) {
|
||||||
|
$bundleCommand = $adapter['bundleCommand'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$commands[] = $envCommand;
|
||||||
|
$commands[] = $deployment->getAttribute('installCommand', '');
|
||||||
|
$commands[] = $deployment->getAttribute('buildCommand', '');
|
||||||
|
$commands[] = $bundleCommand;
|
||||||
|
|
||||||
$commands = array_filter($commands, fn ($command) => !empty($command));
|
$commands = array_filter($commands, fn ($command) => !empty($command));
|
||||||
|
|
||||||
return implode(' && ', $commands);
|
return implode(' && ', $commands);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue