Skip to content

Commit

Permalink
Run Linter and add envvars for Appwrite
Browse files Browse the repository at this point in the history
  • Loading branch information
PineappleIOnic committed Jun 1, 2024
1 parent 8d9f4ef commit d3683e4
Show file tree
Hide file tree
Showing 5 changed files with 140 additions and 5 deletions.
109 changes: 109 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@

# Appwrite
_APP_ENV=development
_APP_EDITION=self-hosted
_APP_LOCALE=en
_APP_WORKER_PER_CORE=6
_APP_CONSOLE_WHITELIST_ROOT=disabled
_APP_CONSOLE_WHITELIST_EMAILS=
_APP_CONSOLE_WHITELIST_IPS=
_APP_CONSOLE_COUNTRIES_DENYLIST=AQ
_APP_CONSOLE_HOSTNAMES=localhost,appwrite.io,*.appwrite.io
_APP_SYSTEM_EMAIL_NAME=Appwrite
_APP_SYSTEM_EMAIL_ADDRESS=[email protected]
_APP_SYSTEM_SECURITY_EMAIL_ADDRESS=[email protected]
_APP_SYSTEM_RESPONSE_FORMAT=
_APP_OPTIONS_ABUSE=disabled
_APP_OPTIONS_ROUTER_PROTECTION=disabled
_APP_OPTIONS_FORCE_HTTPS=disabled
_APP_OPTIONS_FUNCTIONS_FORCE_HTTPS=disabled
_APP_OPENSSL_KEY_V1=your-secret-key
_APP_DOMAIN=localhost
_APP_DOMAIN_FUNCTIONS=functions.localhost
_APP_DOMAIN_TARGET=localhost
_APP_REDIS_HOST=redis
_APP_REDIS_PORT=6379
_APP_REDIS_PASS=
_APP_REDIS_USER=
_APP_DB_HOST=mariadb
_APP_DB_PORT=3306
_APP_DB_SCHEMA=appwrite
_APP_DB_USER=user
_APP_DB_PASS=password
_APP_DB_ROOT_PASS=rootsecretpassword
_APP_STORAGE_DEVICE=Local
_APP_STORAGE_S3_ACCESS_KEY=
_APP_STORAGE_S3_SECRET=
_APP_STORAGE_S3_REGION=us-east-1
_APP_STORAGE_S3_BUCKET=
_APP_STORAGE_DO_SPACES_ACCESS_KEY=
_APP_STORAGE_DO_SPACES_SECRET=
_APP_STORAGE_DO_SPACES_REGION=us-east-1
_APP_STORAGE_DO_SPACES_BUCKET=
_APP_STORAGE_BACKBLAZE_ACCESS_KEY=
_APP_STORAGE_BACKBLAZE_SECRET=
_APP_STORAGE_BACKBLAZE_REGION=us-west-004
_APP_STORAGE_BACKBLAZE_BUCKET=
_APP_STORAGE_LINODE_ACCESS_KEY=
_APP_STORAGE_LINODE_SECRET=
_APP_STORAGE_LINODE_REGION=eu-central-1
_APP_STORAGE_LINODE_BUCKET=
_APP_STORAGE_WASABI_ACCESS_KEY=
_APP_STORAGE_WASABI_SECRET=
_APP_STORAGE_WASABI_REGION=eu-central-1
_APP_STORAGE_WASABI_BUCKET=
_APP_STORAGE_ANTIVIRUS=disabled
_APP_STORAGE_ANTIVIRUS_HOST=clamav
_APP_STORAGE_ANTIVIRUS_PORT=3310
_APP_SMTP_HOST=maildev
_APP_SMTP_PORT=1025
_APP_SMTP_SECURE=
_APP_SMTP_USERNAME=
_APP_SMTP_PASSWORD=
_APP_SMS_PROVIDER=sms://username:password@mock
_APP_SMS_FROM=+123456789
_APP_SMS_PROJECTS_DENY_LIST=
_APP_STORAGE_LIMIT=30000000
_APP_STORAGE_PREVIEW_LIMIT=20000000
_APP_FUNCTIONS_SIZE_LIMIT=30000000
_APP_FUNCTIONS_TIMEOUT=900
_APP_FUNCTIONS_BUILD_TIMEOUT=900
_APP_FUNCTIONS_CPUS=1
_APP_FUNCTIONS_MEMORY=1024
_APP_FUNCTIONS_INACTIVE_THRESHOLD=600
_APP_FUNCTIONS_MAINTENANCE_INTERVAL=600
_APP_FUNCTIONS_RUNTIMES_NETWORK=runtimes
_APP_EXECUTOR_SECRET=your-secret-key
_APP_EXECUTOR_HOST=http://proxy/v1
_APP_FUNCTIONS_RUNTIMES=php-8.0,node-18.0,python-3.9,ruby-3.1
_APP_MAINTENANCE_INTERVAL=86400
_APP_MAINTENANCE_DELAY=
_APP_MAINTENANCE_RETENTION_CACHE=2592000
_APP_MAINTENANCE_RETENTION_EXECUTION=1209600
_APP_MAINTENANCE_RETENTION_ABUSE=86400
_APP_MAINTENANCE_RETENTION_AUDIT=1209600
_APP_USAGE_AGGREGATION_INTERVAL=30
_APP_MAINTENANCE_RETENTION_USAGE_HOURLY=8640000
_APP_MAINTENANCE_RETENTION_SCHEDULES=86400
_APP_USAGE_STATS=enabled
_APP_LOGGING_PROVIDER=
_APP_LOGGING_CONFIG=
_APP_GRAPHQL_MAX_BATCH_SIZE=10
_APP_GRAPHQL_MAX_COMPLEXITY=250
_APP_GRAPHQL_MAX_DEPTH=4
_APP_DOCKER_HUB_USERNAME=
_APP_DOCKER_HUB_PASSWORD=
_APP_VCS_GITHUB_APP_NAME=
_APP_VCS_GITHUB_PRIVATE_KEY=disabled
_APP_VCS_GITHUB_APP_ID=
_APP_VCS_GITHUB_CLIENT_ID=
_APP_VCS_GITHUB_CLIENT_SECRET=
_APP_VCS_GITHUB_WEBHOOK_SECRET=
_APP_MIGRATIONS_FIREBASE_CLIENT_ID=
_APP_MIGRATIONS_FIREBASE_CLIENT_SECRET=
_APP_ASSISTANT_OPENAI_API_KEY=
_APP_MESSAGE_SMS_TEST_DSN=
_APP_MESSAGE_EMAIL_TEST_DSN=
_APP_MESSAGE_PUSH_TEST_DSN=
_APP_WEBHOOK_MAX_FAILED_ATTEMPTS=10
_APP_PROJECT_REGIONS=default
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ composer.lock
/vendor/
/.idea/
*.cache
.env
test-service-account.json
.DS_Store
localBackup/
Expand Down
27 changes: 27 additions & 0 deletions bin/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
SOURCE=supabase

SOURCE_APPWRITE_TEST_PROJECT=6646cbd3874a550d78e1
SOURCE_APPWRITE_TEST_ENDPOINT=http://localhost/v1
SOURCE_APPWRITE_TEST_KEY=d485cca1318af57b68213bcecc9defbeeccb1f3cf94774a4f097b61415f38b2f78f13faf2a3ec91930105df5b8266854f6f8219a8d693040a83ea600fd4458875f741fc7e318b3eca685c3c25a8523d765bcda9ec7f7e8129448cc5986b2fc2c7797300ae27ed68e764dbda508e82a66514fcf9da3187d0eb5f4453e031a1f7d

FIREBASE_TEST_PROJECT=testProject
FIREBASE_TEST_ACCOUNT='{type: "service_account", ...}'

SUPABASE_TEST_ENDPOINT=https://iwnzcwbimmpurmkqcueg.supabase.co
SUPABASE_TEST_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9
SUPABASE_TEST_HOST=aws-0-eu-west-2.pooler.supabase.com
SUPABASE_TEST_DATABASE=postgres
SUPABASE_TEST_USERNAME=postgres.iwnzcwbimmpurmkqcueg
SUPABASE_TEST_PASSWORD=ueTlfhe4bcNfiqHV

NHOST_TEST_SUBDOMAIN=xxxxxxxxxxx
NHOST_TEST_REGION=eu-central-1
NHOST_TEST_SECRET=xxxxxxxxxxxxxxxxx
NHOST_TEST_DATABASE=xxxxxxxxxxxxxxx
NHOST_TEST_USERNAME=postgres
NHOST_TEST_PASSWORD=xxxxxxxxxxxxxxx


DESTINATION_APPWRITE_TEST_PROJECT=6646dd50000c4b4f2b04
DESTINATION_APPWRITE_TEST_ENDPOINT=http://localhost/v1
DESTINATION_APPWRITE_TEST_KEY=c8c3ee7f9491b8320cd57aaad08531a5bbd77651da95b166ee5c26b7f9081dc124952b37a75d1cc4302dd9439d884d7265ceb8c88563cbb3d5bc2bad19381d272233e3836cc7035a166fc75e405dc5a674eeee0c11e646e35848326870974f4ef29412ad97bd81e095fb9c2739fed079f7704a83d8924d199cd65d02534cdda9
2 changes: 1 addition & 1 deletion tests/Migration/E2E/Adapters/MockDestination.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static function getSupportedResources(): array
public function import(array $resources, callable $callback): void
{
foreach ($resources as $resource) {
/** @var Resource $resource */
/** @var resource $resource */
switch ($resource->getName()) {
case 'Deployment':
/** @var Deployment $resource */
Expand Down
6 changes: 3 additions & 3 deletions tests/Migration/E2E/Sources/AppwriteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ protected function setUp(): void

// Bootstrap Appwrite
Console::execute(
"appwrite-toolkit --endpoint http://appwrite/v1 --auto bootstrap --amount 1",
'appwrite-toolkit --endpoint http://appwrite/v1 --auto bootstrap --amount 1',
'',
''
);

// Run Faker
Console::execute(
"appwrite-toolkit --endpoint http://appwrite/v1 --auto faker",
'appwrite-toolkit --endpoint http://appwrite/v1 --auto faker',
'',
''
);
Expand Down Expand Up @@ -94,7 +94,7 @@ public function testValidateTransfer($state)
$this->assertNotEmpty($counters);

if ($counters[Resource::STATUS_ERROR] > 0) {
$this->fail('Resource ' . $resource . ' has ' . $counters[Resource::STATUS_ERROR] . ' errors');
$this->fail('Resource '.$resource.' has '.$counters[Resource::STATUS_ERROR].' errors');

return;
}
Expand Down

0 comments on commit d3683e4

Please sign in to comment.