From e557a5fc6e47293a82d5257e3d2672e37c946e1b Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Wed, 11 Mar 2026 19:41:49 +0000 Subject: [PATCH 01/21] Add Docker Hub login and parallel image pulls to CI Login to Docker Hub in all test jobs to avoid rate limits, add `docker compose pull --quiet` to parallelize image downloads before `docker compose up`, and replace sed-based .env overrides with native GitHub Actions env fields. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/tests.yml | 74 +++++++++++++++++++++++++++++++++++-- 1 file changed, 70 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0cff6288e2..8e937b261a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -53,6 +53,12 @@ jobs: with: submodules: recursive + - name: Login to Docker Hub + uses: docker/login-action@v4 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -97,10 +103,17 @@ jobs: path: /tmp/${{ env.IMAGE }}.tar fail-on-cache-miss: true + - name: Login to Docker Hub + uses: docker/login-action@v4 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} + - name: Load and Start Appwrite timeout-minutes: 3 run: | docker load --input /tmp/${{ env.IMAGE }}.tar + docker compose pull --quiet docker compose up -d until docker compose exec -T appwrite doctor > /dev/null 2>&1; do echo "Waiting for Appwrite to be ready..." @@ -142,10 +155,17 @@ jobs: path: /tmp/${{ env.IMAGE }}.tar fail-on-cache-miss: true + - name: Login to Docker Hub + uses: docker/login-action@v4 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} + - name: Load and Start Appwrite timeout-minutes: 3 run: | docker load --input /tmp/${{ env.IMAGE }}.tar + docker compose pull --quiet docker compose up -d until docker compose exec -T appwrite doctor > /dev/null 2>&1; do echo "Waiting for Appwrite to be ready..." @@ -249,12 +269,19 @@ jobs: echo "_APP_DB_PORT=5432" >> $GITHUB_ENV fi + - name: Login to Docker Hub + uses: docker/login-action@v4 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} + - name: Load and Start Appwrite timeout-minutes: 3 env: _APP_BROWSER_HOST: http://invalid-browser/v1 run: | docker load --input /tmp/${{ env.IMAGE }}.tar + docker compose pull --quiet docker compose up -d until docker compose exec -T appwrite doctor > /dev/null 2>&1; do echo "Waiting for Appwrite to be ready..." @@ -356,10 +383,17 @@ jobs: path: /tmp/${{ env.IMAGE }}.tar fail-on-cache-miss: true + - name: Login to Docker Hub + uses: docker/login-action@v4 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} + - name: Load and Start Appwrite timeout-minutes: 3 run: | docker load --input /tmp/${{ env.IMAGE }}.tar + docker compose pull --quiet docker compose up -d until docker compose exec -T appwrite doctor > /dev/null 2>&1; do echo "Waiting for Appwrite to be ready..." @@ -434,11 +468,19 @@ jobs: path: /tmp/${{ env.IMAGE }}.tar fail-on-cache-miss: true + - name: Login to Docker Hub + uses: docker/login-action@v4 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} + - name: Load and Start Appwrite timeout-minutes: 3 + env: + _APP_OPTIONS_ABUSE: enabled run: | docker load --input /tmp/${{ env.IMAGE }}.tar - sed -i 's/_APP_OPTIONS_ABUSE=disabled/_APP_OPTIONS_ABUSE=enabled/' .env + docker compose pull --quiet docker compose up -d until docker compose exec -T appwrite doctor > /dev/null 2>&1; do echo "Waiting for Appwrite to be ready..." @@ -499,11 +541,19 @@ jobs: path: /tmp/${{ env.IMAGE }}.tar fail-on-cache-miss: true + - name: Login to Docker Hub + uses: docker/login-action@v4 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} + - name: Load and Start Appwrite timeout-minutes: 3 + env: + _APP_OPTIONS_ABUSE: enabled run: | docker load --input /tmp/${{ env.IMAGE }}.tar - sed -i 's/_APP_OPTIONS_ABUSE=disabled/_APP_OPTIONS_ABUSE=enabled/' .env + docker compose pull --quiet docker compose up -d until docker compose exec -T appwrite doctor > /dev/null 2>&1; do echo "Waiting for Appwrite to be ready..." @@ -562,11 +612,19 @@ jobs: path: /tmp/${{ env.IMAGE }}.tar fail-on-cache-miss: true + - name: Login to Docker Hub + uses: docker/login-action@v4 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} + - name: Load and Start Appwrite timeout-minutes: 3 + env: + _APP_OPTIONS_ABUSE: enabled run: | docker load --input /tmp/${{ env.IMAGE }}.tar - sed -i 's/_APP_OPTIONS_ABUSE=disabled/_APP_OPTIONS_ABUSE=enabled/' .env + docker compose pull --quiet docker compose up -d until docker compose exec -T appwrite doctor > /dev/null 2>&1; do echo "Waiting for Appwrite to be ready..." @@ -636,11 +694,19 @@ jobs: path: /tmp/${{ env.IMAGE }}.tar fail-on-cache-miss: true + - name: Login to Docker Hub + uses: docker/login-action@v4 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} + - name: Load and Start Appwrite timeout-minutes: 3 + env: + _APP_OPTIONS_ABUSE: enabled run: | docker load --input /tmp/${{ env.IMAGE }}.tar - sed -i 's/_APP_OPTIONS_ABUSE=disabled/_APP_OPTIONS_ABUSE=enabled/' .env + docker compose pull --quiet docker compose up -d until docker compose exec -T appwrite doctor > /dev/null 2>&1; do echo "Waiting for Appwrite to be ready..." From 4e1b710503ba1ee880842a394645b1ea57aba8ee Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Wed, 11 Mar 2026 19:59:23 +0000 Subject: [PATCH 02/21] Fix Docker Hub login credentials to match repo config Use `vars.DOCKERHUB_USERNAME` and `secrets.DOCKERHUB_TOKEN` to match the existing publish and release workflows. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/tests.yml | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8e937b261a..55254ec35a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -56,8 +56,8 @@ jobs: - name: Login to Docker Hub uses: docker/login-action@v4 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -106,8 +106,8 @@ jobs: - name: Login to Docker Hub uses: docker/login-action@v4 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Load and Start Appwrite timeout-minutes: 3 @@ -158,8 +158,8 @@ jobs: - name: Login to Docker Hub uses: docker/login-action@v4 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Load and Start Appwrite timeout-minutes: 3 @@ -272,8 +272,8 @@ jobs: - name: Login to Docker Hub uses: docker/login-action@v4 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Load and Start Appwrite timeout-minutes: 3 @@ -386,8 +386,8 @@ jobs: - name: Login to Docker Hub uses: docker/login-action@v4 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Load and Start Appwrite timeout-minutes: 3 @@ -471,8 +471,8 @@ jobs: - name: Login to Docker Hub uses: docker/login-action@v4 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Load and Start Appwrite timeout-minutes: 3 @@ -544,8 +544,8 @@ jobs: - name: Login to Docker Hub uses: docker/login-action@v4 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Load and Start Appwrite timeout-minutes: 3 @@ -615,8 +615,8 @@ jobs: - name: Login to Docker Hub uses: docker/login-action@v4 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Load and Start Appwrite timeout-minutes: 3 @@ -697,8 +697,8 @@ jobs: - name: Login to Docker Hub uses: docker/login-action@v4 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Load and Start Appwrite timeout-minutes: 3 From 0b416e44753a0a7b00c869ae43e69b0cc8145876 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Wed, 11 Mar 2026 20:01:25 +0000 Subject: [PATCH 03/21] Skip locally-built images during docker compose pull Add --ignore-buildable flag so docker compose pull skips images with build directives (appwrite-dev) instead of trying to pull them from Docker Hub. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/tests.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 55254ec35a..982e19f832 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -113,7 +113,7 @@ jobs: timeout-minutes: 3 run: | docker load --input /tmp/${{ env.IMAGE }}.tar - docker compose pull --quiet + docker compose pull --quiet --ignore-buildable docker compose up -d until docker compose exec -T appwrite doctor > /dev/null 2>&1; do echo "Waiting for Appwrite to be ready..." @@ -165,7 +165,7 @@ jobs: timeout-minutes: 3 run: | docker load --input /tmp/${{ env.IMAGE }}.tar - docker compose pull --quiet + docker compose pull --quiet --ignore-buildable docker compose up -d until docker compose exec -T appwrite doctor > /dev/null 2>&1; do echo "Waiting for Appwrite to be ready..." @@ -281,7 +281,7 @@ jobs: _APP_BROWSER_HOST: http://invalid-browser/v1 run: | docker load --input /tmp/${{ env.IMAGE }}.tar - docker compose pull --quiet + docker compose pull --quiet --ignore-buildable docker compose up -d until docker compose exec -T appwrite doctor > /dev/null 2>&1; do echo "Waiting for Appwrite to be ready..." @@ -393,7 +393,7 @@ jobs: timeout-minutes: 3 run: | docker load --input /tmp/${{ env.IMAGE }}.tar - docker compose pull --quiet + docker compose pull --quiet --ignore-buildable docker compose up -d until docker compose exec -T appwrite doctor > /dev/null 2>&1; do echo "Waiting for Appwrite to be ready..." @@ -480,7 +480,7 @@ jobs: _APP_OPTIONS_ABUSE: enabled run: | docker load --input /tmp/${{ env.IMAGE }}.tar - docker compose pull --quiet + docker compose pull --quiet --ignore-buildable docker compose up -d until docker compose exec -T appwrite doctor > /dev/null 2>&1; do echo "Waiting for Appwrite to be ready..." @@ -553,7 +553,7 @@ jobs: _APP_OPTIONS_ABUSE: enabled run: | docker load --input /tmp/${{ env.IMAGE }}.tar - docker compose pull --quiet + docker compose pull --quiet --ignore-buildable docker compose up -d until docker compose exec -T appwrite doctor > /dev/null 2>&1; do echo "Waiting for Appwrite to be ready..." @@ -624,7 +624,7 @@ jobs: _APP_OPTIONS_ABUSE: enabled run: | docker load --input /tmp/${{ env.IMAGE }}.tar - docker compose pull --quiet + docker compose pull --quiet --ignore-buildable docker compose up -d until docker compose exec -T appwrite doctor > /dev/null 2>&1; do echo "Waiting for Appwrite to be ready..." @@ -706,7 +706,7 @@ jobs: _APP_OPTIONS_ABUSE: enabled run: | docker load --input /tmp/${{ env.IMAGE }}.tar - docker compose pull --quiet + docker compose pull --quiet --ignore-buildable docker compose up -d until docker compose exec -T appwrite doctor > /dev/null 2>&1; do echo "Waiting for Appwrite to be ready..." From d22642590f76a3903ccca6a45be98305ea3a5f3b Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Wed, 11 Mar 2026 20:07:13 +0000 Subject: [PATCH 04/21] Add build directive to all appwrite-dev services for --ignore-buildable Add x-build YAML anchor and apply it to all services using the appwrite-dev image so docker compose pull --ignore-buildable correctly skips them instead of trying to pull from Docker Hub. Co-Authored-By: Claude Opus 4.6 --- docker-compose.yml | 60 ++++++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 4a38757737..c744a9c5a5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,6 +10,15 @@ x-logging: &x-logging max-file: "5" max-size: "10m" +x-build: &x-build + build: + context: . + target: development + args: + DEBUG: false + TESTING: true + VERSION: dev + services: traefik: image: traefik:3.6 @@ -50,15 +59,8 @@ services: appwrite: container_name: appwrite - <<: *x-logging + <<: [*x-logging, *x-build] image: appwrite-dev - build: - context: . - target: development - args: - DEBUG: false - TESTING: true - VERSION: dev ports: - 9501:80 networks: @@ -260,7 +262,7 @@ services: appwrite-realtime: entrypoint: realtime - <<: *x-logging + <<: [*x-logging, *x-build] container_name: appwrite-realtime image: appwrite-dev restart: unless-stopped @@ -312,7 +314,7 @@ services: appwrite-worker-audits: entrypoint: worker-audits - <<: *x-logging + <<: [*x-logging, *x-build] container_name: appwrite-worker-audits image: appwrite-dev networks: @@ -343,7 +345,7 @@ services: appwrite-worker-webhooks: entrypoint: worker-webhooks - <<: *x-logging + <<: [*x-logging, *x-build] container_name: appwrite-worker-webhooks image: appwrite-dev networks: @@ -378,7 +380,7 @@ services: appwrite-worker-deletes: entrypoint: worker-deletes - <<: *x-logging + <<: [*x-logging, *x-build] container_name: appwrite-worker-deletes image: appwrite-dev networks: @@ -443,7 +445,7 @@ services: appwrite-worker-databases: entrypoint: worker-databases - <<: *x-logging + <<: [*x-logging, *x-build] container_name: appwrite-worker-databases image: appwrite-dev networks: @@ -476,7 +478,7 @@ services: appwrite-worker-builds: entrypoint: worker-builds - <<: *x-logging + <<: [*x-logging, *x-build] container_name: appwrite-worker-builds image: appwrite-dev networks: @@ -551,7 +553,7 @@ services: appwrite-worker-screenshots: entrypoint: worker-screenshots - <<: *x-logging + <<: [*x-logging, *x-build] container_name: appwrite-worker-screenshots image: appwrite-dev networks: @@ -614,7 +616,7 @@ services: appwrite-worker-certificates: entrypoint: worker-certificates - <<: *x-logging + <<: [*x-logging, *x-build] container_name: appwrite-worker-certificates image: appwrite-dev networks: @@ -656,7 +658,7 @@ services: appwrite-worker-executions: entrypoint: worker-executions - <<: *x-logging + <<: [*x-logging, *x-build] container_name: appwrite-worker-executions image: appwrite-dev networks: @@ -686,7 +688,7 @@ services: appwrite-worker-functions: entrypoint: worker-functions - <<: *x-logging + <<: [*x-logging, *x-build] container_name: appwrite-worker-functions image: appwrite-dev networks: @@ -730,7 +732,7 @@ services: appwrite-worker-mails: entrypoint: worker-mails - <<: *x-logging + <<: [*x-logging, *x-build] container_name: appwrite-worker-mails image: appwrite-dev networks: @@ -772,7 +774,7 @@ services: appwrite-worker-messaging: entrypoint: worker-messaging - <<: *x-logging + <<: [*x-logging, *x-build] container_name: appwrite-worker-messaging restart: unless-stopped image: appwrite-dev @@ -829,7 +831,7 @@ services: appwrite-worker-migrations: entrypoint: worker-migrations - <<: *x-logging + <<: [*x-logging, *x-build] container_name: appwrite-worker-migrations restart: unless-stopped image: appwrite-dev @@ -874,7 +876,7 @@ services: appwrite-task-maintenance: entrypoint: maintenance - <<: *x-logging + <<: [*x-logging, *x-build] container_name: appwrite-task-maintenance image: appwrite-dev networks: @@ -920,7 +922,7 @@ services: appwrite-task-interval: entrypoint: interval - <<: *x-logging + <<: [*x-logging, *x-build] container_name: appwrite-task-interval image: appwrite-dev networks: @@ -961,7 +963,7 @@ services: appwrite-task-stats-resources: container_name: appwrite-task-stats-resources entrypoint: stats-resources - <<: *x-logging + <<: [*x-logging, *x-build] image: appwrite-dev networks: - appwrite @@ -993,7 +995,7 @@ services: appwrite-worker-stats-resources: entrypoint: worker-stats-resources - <<: *x-logging + <<: [*x-logging, *x-build] container_name: appwrite-worker-stats-resources image: appwrite-dev networks: @@ -1026,7 +1028,7 @@ services: appwrite-worker-stats-usage: entrypoint: worker-stats-usage - <<: *x-logging + <<: [*x-logging, *x-build] container_name: appwrite-worker-stats-usage image: appwrite-dev networks: @@ -1059,7 +1061,7 @@ services: appwrite-task-scheduler-functions: entrypoint: schedule-functions - <<: *x-logging + <<: [*x-logging, *x-build] container_name: appwrite-task-scheduler-functions image: appwrite-dev networks: @@ -1089,7 +1091,7 @@ services: appwrite-task-scheduler-executions: entrypoint: schedule-executions - <<: *x-logging + <<: [*x-logging, *x-build] container_name: appwrite-task-scheduler-executions image: appwrite-dev networks: @@ -1118,7 +1120,7 @@ services: appwrite-task-scheduler-messages: entrypoint: schedule-messages - <<: *x-logging + <<: [*x-logging, *x-build] container_name: appwrite-task-scheduler-messages image: appwrite-dev networks: From 6aac7ea6ad9f25ed2e1fc15c1ace0bc682b7b169 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Wed, 11 Mar 2026 20:17:03 +0000 Subject: [PATCH 05/21] Update GitHub Actions to latest versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - actions/cache: v4 → v5 - docker/setup-buildx-action: v3 → v4 Fixes Node.js 20 deprecation warnings. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/tests.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 982e19f832..3ccf652ccb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -60,7 +60,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@v4 - name: Build Appwrite uses: docker/build-push-action@v6 @@ -79,7 +79,7 @@ jobs: VERSION=dev - name: Cache Docker Image - uses: actions/cache@v4 + uses: actions/cache@v5 with: key: ${{ env.CACHE_KEY }} path: /tmp/${{ env.IMAGE }}.tar @@ -97,7 +97,7 @@ jobs: uses: actions/checkout@v6 - name: Load Cache - uses: actions/cache@v4 + uses: actions/cache@v5 with: key: ${{ env.CACHE_KEY }} path: /tmp/${{ env.IMAGE }}.tar @@ -149,7 +149,7 @@ jobs: uses: actions/checkout@v6 - name: Load Cache - uses: actions/cache@v4 + uses: actions/cache@v5 with: key: ${{ env.CACHE_KEY }} path: /tmp/${{ env.IMAGE }}.tar @@ -243,7 +243,7 @@ jobs: uses: actions/checkout@v6 - name: Load Cache - uses: actions/cache@v4 + uses: actions/cache@v5 with: key: ${{ env.CACHE_KEY }} path: /tmp/${{ env.IMAGE }}.tar @@ -377,7 +377,7 @@ jobs: uses: actions/checkout@v6 - name: Load Cache - uses: actions/cache@v4 + uses: actions/cache@v5 with: key: ${{ env.CACHE_KEY }} path: /tmp/${{ env.IMAGE }}.tar @@ -462,7 +462,7 @@ jobs: uses: actions/checkout@v6 - name: Load Cache - uses: actions/cache@v4 + uses: actions/cache@v5 with: key: ${{ env.CACHE_KEY }} path: /tmp/${{ env.IMAGE }}.tar @@ -535,7 +535,7 @@ jobs: uses: actions/checkout@v6 - name: Load Cache - uses: actions/cache@v4 + uses: actions/cache@v5 with: key: ${{ env.CACHE_KEY }} path: /tmp/${{ env.IMAGE }}.tar @@ -606,7 +606,7 @@ jobs: uses: actions/checkout@v6 - name: Load Cache - uses: actions/cache@v4 + uses: actions/cache@v5 with: key: ${{ env.CACHE_KEY }} path: /tmp/${{ env.IMAGE }}.tar @@ -688,7 +688,7 @@ jobs: uses: actions/checkout@v6 - name: Load Cache - uses: actions/cache@v4 + uses: actions/cache@v5 with: key: ${{ env.CACHE_KEY }} path: /tmp/${{ env.IMAGE }}.tar From 3613a645d049c5c2705c7412837a91b3f24fd938 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Wed, 11 Mar 2026 20:19:04 +0000 Subject: [PATCH 06/21] Remove php-retry action and run test commands directly Replace itznotabug/php-retry with native run steps and timeout-minutes. Also remove pull-requests: write permission that was only needed by php-retry to post PR comments. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/tests.yml | 108 ++++++++---------------------------- 1 file changed, 22 insertions(+), 86 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3ccf652ccb..d252c72a42 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -90,7 +90,6 @@ jobs: needs: setup permissions: contents: read - pull-requests: write steps: - name: checkout @@ -124,18 +123,11 @@ jobs: run: docker compose exec -T appwrite vars - name: Run Unit Tests - uses: itznotabug/php-retry@v3 - with: - max_attempts: 2 - retry_wait_seconds: 300 - timeout_minutes: 15 - job_id: ${{ job.check_run_id }} - github_token: ${{ secrets.GITHUB_TOKEN }} - test_dir: tests/unit - command: >- - docker compose exec - -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" - appwrite test /usr/src/code/tests/unit + timeout-minutes: 15 + run: >- + docker compose exec + -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" + appwrite test /usr/src/code/tests/unit e2e_general_test: name: E2E General Test @@ -143,7 +135,6 @@ jobs: needs: setup permissions: contents: read - pull-requests: write steps: - name: checkout uses: actions/checkout@v6 @@ -181,18 +172,11 @@ jobs: done - name: Run General Tests - uses: itznotabug/php-retry@v3 - with: - max_attempts: 2 - retry_wait_seconds: 300 - timeout_minutes: 15 - job_id: ${{ job.check_run_id }} - github_token: ${{ secrets.GITHUB_TOKEN }} - test_dir: tests/e2e/General - command: >- - docker compose exec -T - -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" - appwrite test /usr/src/code/tests/e2e/General --debug + timeout-minutes: 15 + run: >- + docker compose exec -T + -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" + appwrite test /usr/src/code/tests/e2e/General --debug - name: Failure Logs if: failure() @@ -206,7 +190,6 @@ jobs: needs: setup permissions: contents: read - pull-requests: write strategy: fail-fast: false matrix: @@ -297,15 +280,8 @@ jobs: done - name: Run ${{ matrix.service }} tests with Project table mode - uses: itznotabug/php-retry@v3 - with: - max_attempts: 2 - retry_wait_seconds: 300 - timeout_minutes: 20 - job_id: ${{ job.check_run_id }} - github_token: ${{ secrets.GITHUB_TOKEN }} - test_dir: tests/e2e/Services/${{ matrix.service }} - command: | + timeout-minutes: 20 + run: | echo "Using project tables" SERVICE_PATH="/usr/src/code/tests/e2e/Services/${{ matrix.service }}" @@ -339,7 +315,6 @@ jobs: if: needs.check_database_changes.outputs.database_changed == 'true' permissions: contents: read - pull-requests: write strategy: fail-fast: false matrix: @@ -409,15 +384,8 @@ jobs: done - name: Run ${{ matrix.service }} tests with ${{ matrix.tables-mode }} table mode - uses: itznotabug/php-retry@v3 - with: - max_attempts: 2 - retry_wait_seconds: 300 - timeout_minutes: 20 - job_id: ${{ job.check_run_id }} - github_token: ${{ secrets.GITHUB_TOKEN }} - test_dir: tests/e2e/Services/${{ matrix.service }} - command: | + timeout-minutes: 20 + run: | if [ "${{ matrix.tables-mode }}" == "Shared V1" ]; then echo "Using shared tables V1" export _APP_DATABASE_SHARED_TABLES=database_db_main @@ -456,7 +424,6 @@ jobs: needs: setup permissions: contents: read - pull-requests: write steps: - name: checkout uses: actions/checkout@v6 @@ -488,15 +455,8 @@ jobs: done - name: Run Projects tests in dedicated table mode - uses: itznotabug/php-retry@v3 - with: - max_attempts: 2 - retry_wait_seconds: 300 - timeout_minutes: 15 - job_id: ${{ job.check_run_id }} - github_token: ${{ secrets.GITHUB_TOKEN }} - test_dir: tests/e2e/Services/Projects - command: | + timeout-minutes: 15 + run: | echo "Using project tables" export _APP_DATABASE_SHARED_TABLES= export _APP_DATABASE_SHARED_TABLES_V1= @@ -522,7 +482,6 @@ jobs: if: needs.check_database_changes.outputs.database_changed == 'true' permissions: contents: read - pull-requests: write strategy: fail-fast: false matrix: @@ -561,15 +520,8 @@ jobs: done - name: Run Projects tests in ${{ matrix.tables-mode }} table mode - uses: itznotabug/php-retry@v3 - with: - max_attempts: 2 - retry_wait_seconds: 300 - timeout_minutes: 15 - job_id: ${{ job.check_run_id }} - github_token: ${{ secrets.GITHUB_TOKEN }} - test_dir: tests/e2e/Services/Projects - command: | + timeout-minutes: 15 + run: | if [ "${{ matrix.tables-mode }}" == "Shared V1" ]; then echo "Using shared tables V1" export _APP_DATABASE_SHARED_TABLES=database_db_main @@ -600,7 +552,6 @@ jobs: needs: setup permissions: contents: read - pull-requests: write steps: - name: checkout uses: actions/checkout@v6 @@ -640,15 +591,8 @@ jobs: done - name: Run Site tests with browser connected in dedicated table mode - uses: itznotabug/php-retry@v3 - with: - max_attempts: 2 - retry_wait_seconds: 300 - timeout_minutes: 15 - job_id: ${{ job.check_run_id }} - github_token: ${{ secrets.GITHUB_TOKEN }} - test_dir: tests/e2e/Services/Sites - command: | + timeout-minutes: 15 + run: | echo "Keeping original value of _APP_BROWSER_HOST" echo "Using project tables" export _APP_DATABASE_SHARED_TABLES= @@ -675,7 +619,6 @@ jobs: if: needs.check_database_changes.outputs.database_changed == 'true' permissions: contents: read - pull-requests: write strategy: fail-fast: false matrix: @@ -722,15 +665,8 @@ jobs: done - name: Run Site tests with browser connected in ${{ matrix.tables-mode }} table mode - uses: itznotabug/php-retry@v3 - with: - max_attempts: 2 - retry_wait_seconds: 300 - timeout_minutes: 15 - job_id: ${{ job.check_run_id }} - github_token: ${{ secrets.GITHUB_TOKEN }} - test_dir: tests/e2e/Services/Sites - command: | + timeout-minutes: 15 + run: | echo "Keeping original value of _APP_BROWSER_HOST" if [ "${{ matrix.tables-mode }}" == "Shared V1" ]; then echo "Using shared tables V1" From dc9a1c03d18bc6f3ef5f1452f9ab89ef00e9d0cb Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Wed, 11 Mar 2026 20:20:23 +0000 Subject: [PATCH 07/21] Replace shell exports with GitHub Actions env fields Use step-level env: fields and GHA expressions for conditional values instead of shell export statements and if/elif blocks. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/tests.yml | 103 ++++++++++++++---------------------- 1 file changed, 39 insertions(+), 64 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d252c72a42..e78a23575c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -385,17 +385,10 @@ jobs: - name: Run ${{ matrix.service }} tests with ${{ matrix.tables-mode }} table mode timeout-minutes: 20 + env: + _APP_DATABASE_SHARED_TABLES: database_db_main + _APP_DATABASE_SHARED_TABLES_V1: ${{ matrix.tables-mode == 'Shared V1' && 'database_db_main' || '' }} run: | - if [ "${{ matrix.tables-mode }}" == "Shared V1" ]; then - echo "Using shared tables V1" - export _APP_DATABASE_SHARED_TABLES=database_db_main - export _APP_DATABASE_SHARED_TABLES_V1=database_db_main - elif [ "${{ matrix.tables-mode }}" == "Shared V2" ]; then - echo "Using shared tables V2" - export _APP_DATABASE_SHARED_TABLES=database_db_main - export _APP_DATABASE_SHARED_TABLES_V1= - fi - SERVICE_PATH="/usr/src/code/tests/e2e/Services/${{ matrix.service }}" # Services that rely on sequential test method execution (shared static state) @@ -456,16 +449,15 @@ jobs: - name: Run Projects tests in dedicated table mode timeout-minutes: 15 - run: | - echo "Using project tables" - export _APP_DATABASE_SHARED_TABLES= - export _APP_DATABASE_SHARED_TABLES_V1= - - docker compose exec -T \ - -e _APP_DATABASE_SHARED_TABLES \ - -e _APP_DATABASE_SHARED_TABLES_V1 \ - -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" \ - appwrite test /usr/src/code/tests/e2e/Services/Projects --debug --group=abuseEnabled + env: + _APP_DATABASE_SHARED_TABLES: "" + _APP_DATABASE_SHARED_TABLES_V1: "" + run: >- + docker compose exec -T + -e _APP_DATABASE_SHARED_TABLES + -e _APP_DATABASE_SHARED_TABLES_V1 + -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" + appwrite test /usr/src/code/tests/e2e/Services/Projects --debug --group=abuseEnabled - name: Failure Logs if: failure() @@ -521,22 +513,15 @@ jobs: - name: Run Projects tests in ${{ matrix.tables-mode }} table mode timeout-minutes: 15 - run: | - if [ "${{ matrix.tables-mode }}" == "Shared V1" ]; then - echo "Using shared tables V1" - export _APP_DATABASE_SHARED_TABLES=database_db_main - export _APP_DATABASE_SHARED_TABLES_V1=database_db_main - elif [ "${{ matrix.tables-mode }}" == "Shared V2" ]; then - echo "Using shared tables V2" - export _APP_DATABASE_SHARED_TABLES=database_db_main - export _APP_DATABASE_SHARED_TABLES_V1= - fi - - docker compose exec -T \ - -e _APP_DATABASE_SHARED_TABLES \ - -e _APP_DATABASE_SHARED_TABLES_V1 \ - -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" \ - appwrite test /usr/src/code/tests/e2e/Services/Projects --debug --group=abuseEnabled + env: + _APP_DATABASE_SHARED_TABLES: database_db_main + _APP_DATABASE_SHARED_TABLES_V1: ${{ matrix.tables-mode == 'Shared V1' && 'database_db_main' || '' }} + run: >- + docker compose exec -T + -e _APP_DATABASE_SHARED_TABLES + -e _APP_DATABASE_SHARED_TABLES_V1 + -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" + appwrite test /usr/src/code/tests/e2e/Services/Projects --debug --group=abuseEnabled - name: Failure Logs if: failure() @@ -592,17 +577,15 @@ jobs: - name: Run Site tests with browser connected in dedicated table mode timeout-minutes: 15 - run: | - echo "Keeping original value of _APP_BROWSER_HOST" - echo "Using project tables" - export _APP_DATABASE_SHARED_TABLES= - export _APP_DATABASE_SHARED_TABLES_V1= - - docker compose exec -T \ - -e _APP_DATABASE_SHARED_TABLES \ - -e _APP_DATABASE_SHARED_TABLES_V1 \ - -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" \ - appwrite test /usr/src/code/tests/e2e/Services/Sites --debug --group=screenshots + env: + _APP_DATABASE_SHARED_TABLES: "" + _APP_DATABASE_SHARED_TABLES_V1: "" + run: >- + docker compose exec -T + -e _APP_DATABASE_SHARED_TABLES + -e _APP_DATABASE_SHARED_TABLES_V1 + -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" + appwrite test /usr/src/code/tests/e2e/Services/Sites --debug --group=screenshots - name: Failure Logs if: failure() @@ -666,23 +649,15 @@ jobs: - name: Run Site tests with browser connected in ${{ matrix.tables-mode }} table mode timeout-minutes: 15 - run: | - echo "Keeping original value of _APP_BROWSER_HOST" - if [ "${{ matrix.tables-mode }}" == "Shared V1" ]; then - echo "Using shared tables V1" - export _APP_DATABASE_SHARED_TABLES=database_db_main - export _APP_DATABASE_SHARED_TABLES_V1=database_db_main - elif [ "${{ matrix.tables-mode }}" == "Shared V2" ]; then - echo "Using shared tables V2" - export _APP_DATABASE_SHARED_TABLES=database_db_main - export _APP_DATABASE_SHARED_TABLES_V1= - fi - - docker compose exec -T \ - -e _APP_DATABASE_SHARED_TABLES \ - -e _APP_DATABASE_SHARED_TABLES_V1 \ - -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" \ - appwrite test /usr/src/code/tests/e2e/Services/Sites --debug --group=screenshots + env: + _APP_DATABASE_SHARED_TABLES: database_db_main + _APP_DATABASE_SHARED_TABLES_V1: ${{ matrix.tables-mode == 'Shared V1' && 'database_db_main' || '' }} + run: >- + docker compose exec -T + -e _APP_DATABASE_SHARED_TABLES + -e _APP_DATABASE_SHARED_TABLES_V1 + -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" + appwrite test /usr/src/code/tests/e2e/Services/Sites --debug --group=screenshots - name: Failure Logs if: failure() From d30df31b826f24962f27089feefc99fbdb503818 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Wed, 11 Mar 2026 20:25:47 +0000 Subject: [PATCH 08/21] Move compose-time env vars to docker compose up step _APP_DATABASE_SHARED_TABLES and _APP_DATABASE_SHARED_TABLES_V1 are read by the server at boot time via System::getEnv(), not by the test runner. Passing them via docker compose exec -e had no effect on the already-running Swoole server. Move them to the Load and Start Appwrite step so they're set at docker compose up time. Keep _APP_E2E_RESPONSE_FORMAT on exec since it's read by the test runner process (tests/e2e/Scopes/Scope.php). Co-Authored-By: Claude Opus 4.6 --- .github/workflows/tests.yml | 46 +++++++++++-------------------------- 1 file changed, 13 insertions(+), 33 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e78a23575c..201a47c8ba 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -262,6 +262,8 @@ jobs: timeout-minutes: 3 env: _APP_BROWSER_HOST: http://invalid-browser/v1 + _APP_DATABASE_SHARED_TABLES: "" + _APP_DATABASE_SHARED_TABLES_V1: "" run: | docker load --input /tmp/${{ env.IMAGE }}.tar docker compose pull --quiet --ignore-buildable @@ -282,7 +284,6 @@ jobs: - name: Run ${{ matrix.service }} tests with Project table mode timeout-minutes: 20 run: | - echo "Using project tables" SERVICE_PATH="/usr/src/code/tests/e2e/Services/${{ matrix.service }}" # Services that rely on sequential test method execution (shared static state) @@ -291,14 +292,7 @@ jobs: Databases|Functions|Realtime) FUNCTIONAL_FLAG="" ;; esac - echo "Running with paratest (parallel) for: ${{ matrix.service }} ${FUNCTIONAL_FLAG:+(functional)}" docker compose exec -T \ - -e _APP_DATABASE_SHARED_TABLES="" \ - -e _APP_DATABASE_SHARED_TABLES_V1="" \ - -e _APP_DB_ADAPTER="${{ env._APP_DB_ADAPTER }}" \ - -e _APP_DB_HOST="${{ env._APP_DB_HOST }}" \ - -e _APP_DB_PORT="${{ env._APP_DB_PORT }}" \ - -e _APP_DB_SCHEMA=appwrite \ -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" \ appwrite vendor/bin/paratest --processes $(nproc) $FUNCTIONAL_FLAG "$SERVICE_PATH" --exclude-group abuseEnabled --exclude-group screenshots --exclude-group ciIgnore --log-junit tests/e2e/Services/${{ matrix.service }}/junit.xml @@ -366,6 +360,9 @@ jobs: - name: Load and Start Appwrite timeout-minutes: 3 + env: + _APP_DATABASE_SHARED_TABLES: database_db_main + _APP_DATABASE_SHARED_TABLES_V1: ${{ matrix.tables-mode == 'Shared V1' && 'database_db_main' || '' }} run: | docker load --input /tmp/${{ env.IMAGE }}.tar docker compose pull --quiet --ignore-buildable @@ -385,9 +382,6 @@ jobs: - name: Run ${{ matrix.service }} tests with ${{ matrix.tables-mode }} table mode timeout-minutes: 20 - env: - _APP_DATABASE_SHARED_TABLES: database_db_main - _APP_DATABASE_SHARED_TABLES_V1: ${{ matrix.tables-mode == 'Shared V1' && 'database_db_main' || '' }} run: | SERVICE_PATH="/usr/src/code/tests/e2e/Services/${{ matrix.service }}" @@ -398,8 +392,6 @@ jobs: esac docker compose exec -T \ - -e _APP_DATABASE_SHARED_TABLES \ - -e _APP_DATABASE_SHARED_TABLES_V1 \ -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" \ appwrite vendor/bin/paratest --processes $(nproc) $FUNCTIONAL_FLAG "$SERVICE_PATH" --exclude-group abuseEnabled --exclude-group screenshots --exclude-group ciIgnore --log-junit tests/e2e/Services/${{ matrix.service }}/junit.xml @@ -438,6 +430,8 @@ jobs: timeout-minutes: 3 env: _APP_OPTIONS_ABUSE: enabled + _APP_DATABASE_SHARED_TABLES: "" + _APP_DATABASE_SHARED_TABLES_V1: "" run: | docker load --input /tmp/${{ env.IMAGE }}.tar docker compose pull --quiet --ignore-buildable @@ -449,13 +443,8 @@ jobs: - name: Run Projects tests in dedicated table mode timeout-minutes: 15 - env: - _APP_DATABASE_SHARED_TABLES: "" - _APP_DATABASE_SHARED_TABLES_V1: "" run: >- docker compose exec -T - -e _APP_DATABASE_SHARED_TABLES - -e _APP_DATABASE_SHARED_TABLES_V1 -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" appwrite test /usr/src/code/tests/e2e/Services/Projects --debug --group=abuseEnabled @@ -502,6 +491,8 @@ jobs: timeout-minutes: 3 env: _APP_OPTIONS_ABUSE: enabled + _APP_DATABASE_SHARED_TABLES: database_db_main + _APP_DATABASE_SHARED_TABLES_V1: ${{ matrix.tables-mode == 'Shared V1' && 'database_db_main' || '' }} run: | docker load --input /tmp/${{ env.IMAGE }}.tar docker compose pull --quiet --ignore-buildable @@ -513,13 +504,8 @@ jobs: - name: Run Projects tests in ${{ matrix.tables-mode }} table mode timeout-minutes: 15 - env: - _APP_DATABASE_SHARED_TABLES: database_db_main - _APP_DATABASE_SHARED_TABLES_V1: ${{ matrix.tables-mode == 'Shared V1' && 'database_db_main' || '' }} run: >- docker compose exec -T - -e _APP_DATABASE_SHARED_TABLES - -e _APP_DATABASE_SHARED_TABLES_V1 -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" appwrite test /usr/src/code/tests/e2e/Services/Projects --debug --group=abuseEnabled @@ -558,6 +544,8 @@ jobs: timeout-minutes: 3 env: _APP_OPTIONS_ABUSE: enabled + _APP_DATABASE_SHARED_TABLES: "" + _APP_DATABASE_SHARED_TABLES_V1: "" run: | docker load --input /tmp/${{ env.IMAGE }}.tar docker compose pull --quiet --ignore-buildable @@ -577,13 +565,8 @@ jobs: - name: Run Site tests with browser connected in dedicated table mode timeout-minutes: 15 - env: - _APP_DATABASE_SHARED_TABLES: "" - _APP_DATABASE_SHARED_TABLES_V1: "" run: >- docker compose exec -T - -e _APP_DATABASE_SHARED_TABLES - -e _APP_DATABASE_SHARED_TABLES_V1 -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" appwrite test /usr/src/code/tests/e2e/Services/Sites --debug --group=screenshots @@ -630,6 +613,8 @@ jobs: timeout-minutes: 3 env: _APP_OPTIONS_ABUSE: enabled + _APP_DATABASE_SHARED_TABLES: database_db_main + _APP_DATABASE_SHARED_TABLES_V1: ${{ matrix.tables-mode == 'Shared V1' && 'database_db_main' || '' }} run: | docker load --input /tmp/${{ env.IMAGE }}.tar docker compose pull --quiet --ignore-buildable @@ -649,13 +634,8 @@ jobs: - name: Run Site tests with browser connected in ${{ matrix.tables-mode }} table mode timeout-minutes: 15 - env: - _APP_DATABASE_SHARED_TABLES: database_db_main - _APP_DATABASE_SHARED_TABLES_V1: ${{ matrix.tables-mode == 'Shared V1' && 'database_db_main' || '' }} run: >- docker compose exec -T - -e _APP_DATABASE_SHARED_TABLES - -e _APP_DATABASE_SHARED_TABLES_V1 -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" appwrite test /usr/src/code/tests/e2e/Services/Sites --debug --group=screenshots From 534dc55f17780a49b7d800316f7bbcb67ad5a9e7 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Wed, 11 Mar 2026 20:35:42 +0000 Subject: [PATCH 09/21] Remove unnecessary abuse enabled from screenshot tests The screenshot tests have no abuse-related code. Abuse was only enabled on these jobs as a side effect of the original sed command applying to all jobs below e2e_service_test. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/tests.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 201a47c8ba..721c25cadf 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -543,7 +543,6 @@ jobs: - name: Load and Start Appwrite timeout-minutes: 3 env: - _APP_OPTIONS_ABUSE: enabled _APP_DATABASE_SHARED_TABLES: "" _APP_DATABASE_SHARED_TABLES_V1: "" run: | @@ -612,7 +611,6 @@ jobs: - name: Load and Start Appwrite timeout-minutes: 3 env: - _APP_OPTIONS_ABUSE: enabled _APP_DATABASE_SHARED_TABLES: database_db_main _APP_DATABASE_SHARED_TABLES_V1: ${{ matrix.tables-mode == 'Shared V1' && 'database_db_main' || '' }} run: | From ecca0d80363fcd88030989d22c6a6729241f15e0 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Wed, 11 Mar 2026 20:48:39 +0000 Subject: [PATCH 10/21] Increase Load and Start Appwrite timeout from 3 to 10 minutes The 3-minute timeout was too tight with the added docker compose pull step for downloading third-party images. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/tests.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 721c25cadf..5c20ca094d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -109,7 +109,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Load and Start Appwrite - timeout-minutes: 3 + timeout-minutes: 10 run: | docker load --input /tmp/${{ env.IMAGE }}.tar docker compose pull --quiet --ignore-buildable @@ -153,7 +153,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Load and Start Appwrite - timeout-minutes: 3 + timeout-minutes: 10 run: | docker load --input /tmp/${{ env.IMAGE }}.tar docker compose pull --quiet --ignore-buildable @@ -259,7 +259,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Load and Start Appwrite - timeout-minutes: 3 + timeout-minutes: 10 env: _APP_BROWSER_HOST: http://invalid-browser/v1 _APP_DATABASE_SHARED_TABLES: "" @@ -359,7 +359,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Load and Start Appwrite - timeout-minutes: 3 + timeout-minutes: 10 env: _APP_DATABASE_SHARED_TABLES: database_db_main _APP_DATABASE_SHARED_TABLES_V1: ${{ matrix.tables-mode == 'Shared V1' && 'database_db_main' || '' }} @@ -427,7 +427,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Load and Start Appwrite - timeout-minutes: 3 + timeout-minutes: 10 env: _APP_OPTIONS_ABUSE: enabled _APP_DATABASE_SHARED_TABLES: "" @@ -488,7 +488,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Load and Start Appwrite - timeout-minutes: 3 + timeout-minutes: 10 env: _APP_OPTIONS_ABUSE: enabled _APP_DATABASE_SHARED_TABLES: database_db_main @@ -541,7 +541,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Load and Start Appwrite - timeout-minutes: 3 + timeout-minutes: 10 env: _APP_DATABASE_SHARED_TABLES: "" _APP_DATABASE_SHARED_TABLES_V1: "" @@ -609,7 +609,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Load and Start Appwrite - timeout-minutes: 3 + timeout-minutes: 10 env: _APP_DATABASE_SHARED_TABLES: database_db_main _APP_DATABASE_SHARED_TABLES_V1: ${{ matrix.tables-mode == 'Shared V1' && 'database_db_main' || '' }} From 0bbcc3f570455e241776460669a5683d74e3676a Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Wed, 11 Mar 2026 21:06:44 +0000 Subject: [PATCH 11/21] Move dev tools to docker-compose.override.yml Move adminer, redis-insight, mongo-express, and graphql-explorer to an override file. CI sets COMPOSE_FILE=docker-compose.yml explicitly so these are excluded from test runs, reducing the number of images to pull from 14 to 10. Local docker compose auto-loads both files so dev workflow is unchanged. Co-Authored-By: Claude Opus 4.6 --- docker-compose.override.yml | 144 ++++++++++++++++++++++++++++++++++++ docker-compose.yml | 142 +---------------------------------- 2 files changed, 147 insertions(+), 139 deletions(-) create mode 100644 docker-compose.override.yml diff --git a/docker-compose.override.yml b/docker-compose.override.yml new file mode 100644 index 0000000000..29182f01d2 --- /dev/null +++ b/docker-compose.override.yml @@ -0,0 +1,144 @@ +# Dev tools for local development only. +# This file is automatically loaded by `docker compose` alongside docker-compose.yml. +# CI sets COMPOSE_FILE=docker-compose.yml explicitly, so these services are excluded from test runs. + +services: + appwrite-mongo-express: + profiles: ["mongodb"] + image: mongo-express + container_name: appwrite-mongo-express + networks: + - appwrite + ports: + - "8082:8081" + environment: + ME_CONFIG_MONGODB_URL: "mongodb://root:${_APP_DB_ROOT_PASS}@appwrite-mongodb:27017/?replicaSet=rs0&directConnection=true" + ME_CONFIG_BASICAUTH_USERNAME: ${_APP_DB_USER} + ME_CONFIG_BASICAUTH_PASSWORD: ${_APP_DB_PASS} + depends_on: + - mongodb + + adminer: + image: adminer + container_name: appwrite-adminer + restart: always + ports: + - 9506:8080 + networks: + - appwrite + - gateway + environment: + - ADMINER_DESIGN=pepa-linha + - ADMINER_DEFAULT_SERVER=mariadb + - ADMINER_DEFAULT_USERNAME=root + - ADMINER_DEFAULT_PASSWORD=rootsecretpassword + - ADMINER_DEFAULT_DB=appwrite + configs: + - source: adminer-index.php + target: /var/www/html/index.php + mode: 0755 + labels: + - "traefik.enable=true" + - "traefik.constraint-label-stack=appwrite" + - "traefik.docker.network=gateway" + - "traefik.http.services.appwrite_adminer.loadbalancer.server.port=8080" + - "traefik.http.routers.appwrite_adminer_http.entrypoints=appwrite_web" + - "traefik.http.routers.appwrite_adminer_http.rule=Host(`mysql.localhost`)" + - "traefik.http.routers.appwrite_adminer_http.service=appwrite_adminer" + - "traefik.http.routers.appwrite_adminer_https.entrypoints=appwrite_websecure" + - "traefik.http.routers.appwrite_adminer_https.rule=Host(`mysql.localhost`)" + - "traefik.http.routers.appwrite_adminer_https.service=appwrite_adminer" + - "traefik.http.routers.appwrite_adminer_https.tls=true" + + redis-insight: + image: redis/redisinsight:latest + restart: unless-stopped + networks: + - appwrite + - gateway + environment: + - RI_PRE_SETUP_DATABASES_PATH=/mnt/connections.json + configs: + - source: redisinsight-connections.json + target: /mnt/connections.json + mode: 0755 + labels: + - "traefik.enable=true" + - "traefik.constraint-label-stack=appwrite" + - "traefik.docker.network=gateway" + - "traefik.http.services.appwrite_redisinsight.loadbalancer.server.port=5540" + - "traefik.http.routers.appwrite_redisinsight_http.entrypoints=appwrite_web" + - "traefik.http.routers.appwrite_redisinsight_http.rule=Host(`redis.localhost`)" + - "traefik.http.routers.appwrite_redisinsight_http.service=appwrite_redisinsight" + - "traefik.http.routers.appwrite_redisinsight_https.entrypoints=appwrite_websecure" + - "traefik.http.routers.appwrite_redisinsight_https.rule=Host(`redis.localhost`)" + - "traefik.http.routers.appwrite_redisinsight_https.service=appwrite_redisinsight" + - "traefik.http.routers.appwrite_redisinsight_https.tls=true" + ports: + - "8081:5540" + + graphql-explorer: + container_name: appwrite-graphql-explorer + image: appwrite/altair:0.3.0 + restart: unless-stopped + networks: + - appwrite + ports: + - "9509:3000" + environment: + - SERVER_URL=http://localhost/v1/graphql + +configs: + redisinsight-connections.json: + content: | + [ + { + "compressor": "NONE", + "id": "104dc90a-21ef-4d5e-8912-b30baabb152f", + "host": "redis", + "port": 6379, + "name": "redis:6379", + "db": 0, + "username": "default", + "password": null, + "connectionType": "STANDALONE", + "nameFromProvider": null, + "provider": "REDIS", + "lastConnection": "2025-10-16T09:22:02.591Z", + "modules": [ + { + "name": "ReJSON", + "version": 20808, + "semanticVersion": "2.8.8" + }, + { + "name": "search", + "version": 21015, + "semanticVersion": "2.10.15" + } + ], + "tls": false, + "tlsServername": null, + "verifyServerCert": null, + "caCert": null, + "clientCert": null, + "ssh": false, + "sshOptions": null, + "forceStandalone": false, + "tags": [] + } + ] + + adminer-index.php: + content: | + $$_ENV['ADMINER_DEFAULT_SERVER'], + 'driver' => 'server', /* seems to autodetect the driver from server settings */ + 'username' => $$_ENV['ADMINER_DEFAULT_USERNAME'], + 'password' => $$_ENV['ADMINER_DEFAULT_PASSWORD'], + 'db' => $$_ENV['ADMINER_DEFAULT_DB'], + ]; + } + include './adminer.php'; diff --git a/docker-compose.yml b/docker-compose.yml index c744a9c5a5..0013fdfa64 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1277,20 +1277,7 @@ services: retries: 10 start_period: 30s - appwrite-mongo-express: - profiles: ["mongodb"] - image: mongo-express - container_name: appwrite-mongo-express - networks: - - appwrite - ports: - - "8082:8081" - environment: - ME_CONFIG_MONGODB_URL: "mongodb://root:${_APP_DB_ROOT_PASS}@appwrite-mongodb:27017/?replicaSet=rs0&directConnection=true" - ME_CONFIG_BASICAUTH_USERNAME: ${_APP_DB_USER} - ME_CONFIG_BASICAUTH_PASSWORD: ${_APP_DB_PASS} - depends_on: - - mongodb + postgresql: profiles: ["postgresql"] @@ -1398,78 +1385,8 @@ services: networks: - appwrite - adminer: - image: adminer - container_name: appwrite-adminer - <<: *x-logging - restart: always - ports: - - 9506:8080 - networks: - - appwrite - - gateway - environment: - - ADMINER_DESIGN=pepa-linha - - ADMINER_DEFAULT_SERVER=mariadb - - ADMINER_DEFAULT_USERNAME=root - - ADMINER_DEFAULT_PASSWORD=rootsecretpassword - - ADMINER_DEFAULT_DB=appwrite - configs: - - source: adminer-index.php - target: /var/www/html/index.php - mode: 0755 - labels: - - "traefik.enable=true" - - "traefik.constraint-label-stack=appwrite" - - "traefik.docker.network=gateway" - - "traefik.http.services.appwrite_adminer.loadbalancer.server.port=8080" - - "traefik.http.routers.appwrite_adminer_http.entrypoints=appwrite_web" - - "traefik.http.routers.appwrite_adminer_http.rule=Host(`mysql.localhost`)" - - "traefik.http.routers.appwrite_adminer_http.service=appwrite_adminer" - - "traefik.http.routers.appwrite_adminer_https.entrypoints=appwrite_websecure" - - "traefik.http.routers.appwrite_adminer_https.rule=Host(`mysql.localhost`)" - - "traefik.http.routers.appwrite_adminer_https.service=appwrite_adminer" - - "traefik.http.routers.appwrite_adminer_https.tls=true" - - redis-insight: - image: redis/redisinsight:latest - restart: unless-stopped - networks: - - appwrite - - gateway - environment: - - RI_PRE_SETUP_DATABASES_PATH=/mnt/connections.json - configs: - - source: redisinsight-connections.json - target: /mnt/connections.json - mode: 0755 - labels: - - "traefik.enable=true" - - "traefik.constraint-label-stack=appwrite" - - "traefik.docker.network=gateway" - - "traefik.http.services.appwrite_redisinsight.loadbalancer.server.port=5540" - - "traefik.http.routers.appwrite_redisinsight_http.entrypoints=appwrite_web" - - "traefik.http.routers.appwrite_redisinsight_http.rule=Host(`redis.localhost`)" - - "traefik.http.routers.appwrite_redisinsight_http.service=appwrite_redisinsight" - - "traefik.http.routers.appwrite_redisinsight_https.entrypoints=appwrite_websecure" - - "traefik.http.routers.appwrite_redisinsight_https.rule=Host(`redis.localhost`)" - - "traefik.http.routers.appwrite_redisinsight_https.service=appwrite_redisinsight" - - "traefik.http.routers.appwrite_redisinsight_https.tls=true" - ports: - - "8081:5540" - - graphql-explorer: - container_name: appwrite-graphql-explorer - image: appwrite/altair:0.3.0 - restart: unless-stopped - networks: - - appwrite - ports: - - "9509:3000" - environment: - - SERVER_URL=http://localhost/v1/graphql - - # Dev Tools End ------------------------------------------------------------------------------------------ + # Dev tools (adminer, redis-insight, mongo-express, graphql-explorer) + # are defined in docker-compose.override.yml networks: gateway: @@ -1482,60 +1399,7 @@ networks: runtimes: name: runtimes -configs: - redisinsight-connections.json: - content: | - [ - { - "compressor": "NONE", - "id": "104dc90a-21ef-4d5e-8912-b30baabb152f", - "host": "redis", - "port": 6379, - "name": "redis:6379", - "db": 0, - "username": "default", - "password": null, - "connectionType": "STANDALONE", - "nameFromProvider": null, - "provider": "REDIS", - "lastConnection": "2025-10-16T09:22:02.591Z", - "modules": [ - { - "name": "ReJSON", - "version": 20808, - "semanticVersion": "2.8.8" - }, - { - "name": "search", - "version": 21015, - "semanticVersion": "2.10.15" - } - ], - "tls": false, - "tlsServername": null, - "verifyServerCert": null, - "caCert": null, - "clientCert": null, - "ssh": false, - "sshOptions": null, - "forceStandalone": false, - "tags": [] - } - ] - adminer-index.php: - content: | - $$_ENV['ADMINER_DEFAULT_SERVER'], - 'driver' => 'server', /* seems to autodetect the driver from server settings */ - 'username' => $$_ENV['ADMINER_DEFAULT_USERNAME'], - 'password' => $$_ENV['ADMINER_DEFAULT_PASSWORD'], - 'db' => $$_ENV['ADMINER_DEFAULT_DB'], - ]; - } - include './adminer.php'; volumes: appwrite-mariadb: From 33ce469ab0206b161b60983fabca86d666fdc839 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Wed, 11 Mar 2026 21:44:15 +0000 Subject: [PATCH 12/21] Add Docker healthcheck and use --wait instead of polling loop Replace the manual shell polling loop (until doctor > /dev/null) with a proper Docker healthcheck on the appwrite service and `docker compose up --wait`, which blocks until healthchecks pass. Also reverts the timeout back to 3 minutes now that image pulls are cached. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/tests.yml | 64 ++++++++++--------------------------- docker-compose.yml | 5 +++ 2 files changed, 21 insertions(+), 48 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5c20ca094d..cebcd2a62c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -109,15 +109,11 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Load and Start Appwrite - timeout-minutes: 10 + timeout-minutes: 3 run: | docker load --input /tmp/${{ env.IMAGE }}.tar docker compose pull --quiet --ignore-buildable - docker compose up -d - until docker compose exec -T appwrite doctor > /dev/null 2>&1; do - echo "Waiting for Appwrite to be ready..." - sleep 2 - done + docker compose up -d --quiet-pull --wait - name: Environment Variables run: docker compose exec -T appwrite vars @@ -153,15 +149,11 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Load and Start Appwrite - timeout-minutes: 10 + timeout-minutes: 3 run: | docker load --input /tmp/${{ env.IMAGE }}.tar docker compose pull --quiet --ignore-buildable - docker compose up -d - until docker compose exec -T appwrite doctor > /dev/null 2>&1; do - echo "Waiting for Appwrite to be ready..." - sleep 2 - done + docker compose up -d --quiet-pull --wait - name: Wait for Open Runtimes timeout-minutes: 3 @@ -259,7 +251,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Load and Start Appwrite - timeout-minutes: 10 + timeout-minutes: 3 env: _APP_BROWSER_HOST: http://invalid-browser/v1 _APP_DATABASE_SHARED_TABLES: "" @@ -267,11 +259,7 @@ jobs: run: | docker load --input /tmp/${{ env.IMAGE }}.tar docker compose pull --quiet --ignore-buildable - docker compose up -d - until docker compose exec -T appwrite doctor > /dev/null 2>&1; do - echo "Waiting for Appwrite to be ready..." - sleep 2 - done + docker compose up -d --quiet-pull --wait - name: Wait for Open Runtimes timeout-minutes: 3 @@ -359,18 +347,14 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Load and Start Appwrite - timeout-minutes: 10 + timeout-minutes: 3 env: _APP_DATABASE_SHARED_TABLES: database_db_main _APP_DATABASE_SHARED_TABLES_V1: ${{ matrix.tables-mode == 'Shared V1' && 'database_db_main' || '' }} run: | docker load --input /tmp/${{ env.IMAGE }}.tar docker compose pull --quiet --ignore-buildable - docker compose up -d - until docker compose exec -T appwrite doctor > /dev/null 2>&1; do - echo "Waiting for Appwrite to be ready..." - sleep 2 - done + docker compose up -d --quiet-pull --wait - name: Wait for Open Runtimes timeout-minutes: 3 @@ -427,7 +411,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Load and Start Appwrite - timeout-minutes: 10 + timeout-minutes: 3 env: _APP_OPTIONS_ABUSE: enabled _APP_DATABASE_SHARED_TABLES: "" @@ -435,11 +419,7 @@ jobs: run: | docker load --input /tmp/${{ env.IMAGE }}.tar docker compose pull --quiet --ignore-buildable - docker compose up -d - until docker compose exec -T appwrite doctor > /dev/null 2>&1; do - echo "Waiting for Appwrite to be ready..." - sleep 2 - done + docker compose up -d --quiet-pull --wait - name: Run Projects tests in dedicated table mode timeout-minutes: 15 @@ -488,7 +468,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Load and Start Appwrite - timeout-minutes: 10 + timeout-minutes: 3 env: _APP_OPTIONS_ABUSE: enabled _APP_DATABASE_SHARED_TABLES: database_db_main @@ -496,11 +476,7 @@ jobs: run: | docker load --input /tmp/${{ env.IMAGE }}.tar docker compose pull --quiet --ignore-buildable - docker compose up -d - until docker compose exec -T appwrite doctor > /dev/null 2>&1; do - echo "Waiting for Appwrite to be ready..." - sleep 2 - done + docker compose up -d --quiet-pull --wait - name: Run Projects tests in ${{ matrix.tables-mode }} table mode timeout-minutes: 15 @@ -541,18 +517,14 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Load and Start Appwrite - timeout-minutes: 10 + timeout-minutes: 3 env: _APP_DATABASE_SHARED_TABLES: "" _APP_DATABASE_SHARED_TABLES_V1: "" run: | docker load --input /tmp/${{ env.IMAGE }}.tar docker compose pull --quiet --ignore-buildable - docker compose up -d - until docker compose exec -T appwrite doctor > /dev/null 2>&1; do - echo "Waiting for Appwrite to be ready..." - sleep 2 - done + docker compose up -d --quiet-pull --wait - name: Wait for Open Runtimes timeout-minutes: 3 @@ -609,18 +581,14 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Load and Start Appwrite - timeout-minutes: 10 + timeout-minutes: 3 env: _APP_DATABASE_SHARED_TABLES: database_db_main _APP_DATABASE_SHARED_TABLES_V1: ${{ matrix.tables-mode == 'Shared V1' && 'database_db_main' || '' }} run: | docker load --input /tmp/${{ env.IMAGE }}.tar docker compose pull --quiet --ignore-buildable - docker compose up -d - until docker compose exec -T appwrite doctor > /dev/null 2>&1; do - echo "Waiting for Appwrite to be ready..." - sleep 2 - done + docker compose up -d --quiet-pull --wait - name: Wait for Open Runtimes timeout-minutes: 3 diff --git a/docker-compose.yml b/docker-compose.yml index 0013fdfa64..583b558e60 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -61,6 +61,11 @@ services: container_name: appwrite <<: [*x-logging, *x-build] image: appwrite-dev + healthcheck: + test: ["CMD", "doctor"] + interval: 5s + timeout: 5s + retries: 12 ports: - 9501:80 networks: From 38798c899396ee48b3151185ecaa632495c3f939 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Wed, 11 Mar 2026 21:58:30 +0000 Subject: [PATCH 13/21] Add healthchecks for MariaDB, PostgreSQL, and Redis Add proper healthchecks to infrastructure services and use condition: service_healthy for redis in appwrite's depends_on so it waits for Redis to be ready before starting. Co-Authored-By: Claude Opus 4.6 --- docker-compose.yml | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 583b558e60..c0b0560a7f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -108,10 +108,10 @@ services: - ./dev:/usr/src/code/dev depends_on: - - ${_APP_DB_HOST:-mongodb} - - redis - - coredns - # - clamav + redis: + condition: service_healthy + coredns: + condition: service_started entrypoint: - php - -e @@ -1244,6 +1244,11 @@ services: - MYSQL_PASSWORD=${_APP_DB_PASS} - MARIADB_AUTO_UPGRADE=1 command: "mysqld --innodb-flush-method=fsync" + healthcheck: + test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"] + interval: 5s + timeout: 5s + retries: 12 mongodb: profiles: ["mongodb"] @@ -1303,6 +1308,11 @@ services: - POSTGRES_USER=${_APP_DB_USER} - POSTGRES_PASSWORD=${_APP_DB_PASS} command: "postgres" + healthcheck: + test: ["CMD-SHELL", "pg_isready -U ${_APP_DB_USER}"] + interval: 5s + timeout: 5s + retries: 12 redis: image: redis:7.4.7-alpine @@ -1319,6 +1329,11 @@ services: - appwrite volumes: - appwrite-redis:/data:rw + healthcheck: + test: ["CMD", "redis-cli", "ping"] + interval: 5s + timeout: 5s + retries: 12 coredns: # DNS server for testing purposes (Proxy APIs) image: coredns/coredns:1.12.4 From fd28ad8a6681c9cf8d678cc80c4c29bfc9e5b00d Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Wed, 11 Mar 2026 21:59:33 +0000 Subject: [PATCH 14/21] Remove --debug flag from test commands for quieter CI output Co-Authored-By: Claude Opus 4.6 --- .github/workflows/tests.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index cebcd2a62c..39c9aee9ca 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -168,8 +168,7 @@ jobs: run: >- docker compose exec -T -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" - appwrite test /usr/src/code/tests/e2e/General --debug - + appwrite test /usr/src/code/tests/e2e/General - name: Failure Logs if: failure() run: | From 16929bc42074ef739151d4021aa9d92ee91082f7 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Wed, 11 Mar 2026 22:00:00 +0000 Subject: [PATCH 15/21] Remove remaining --debug flags from test commands Co-Authored-By: Claude Opus 4.6 --- .github/workflows/tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 39c9aee9ca..879b72327d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -425,7 +425,7 @@ jobs: run: >- docker compose exec -T -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" - appwrite test /usr/src/code/tests/e2e/Services/Projects --debug --group=abuseEnabled + appwrite test /usr/src/code/tests/e2e/Services/Projects --group=abuseEnabled - name: Failure Logs if: failure() @@ -482,7 +482,7 @@ jobs: run: >- docker compose exec -T -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" - appwrite test /usr/src/code/tests/e2e/Services/Projects --debug --group=abuseEnabled + appwrite test /usr/src/code/tests/e2e/Services/Projects --group=abuseEnabled - name: Failure Logs if: failure() @@ -538,7 +538,7 @@ jobs: run: >- docker compose exec -T -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" - appwrite test /usr/src/code/tests/e2e/Services/Sites --debug --group=screenshots + appwrite test /usr/src/code/tests/e2e/Services/Sites --group=screenshots - name: Failure Logs if: failure() @@ -602,7 +602,7 @@ jobs: run: >- docker compose exec -T -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" - appwrite test /usr/src/code/tests/e2e/Services/Sites --debug --group=screenshots + appwrite test /usr/src/code/tests/e2e/Services/Sites --group=screenshots - name: Failure Logs if: failure() From 4cbe50193a163f3e9e44e97c520a46a200515e5f Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Wed, 11 Mar 2026 22:24:52 +0000 Subject: [PATCH 16/21] Increase Load and Start Appwrite timeout to 5 minutes The docker compose pull step alone can take over 2.5 minutes on CI (e.g. openruntimes-executor, traefik), leaving no time for docker compose up --wait within 3 minutes. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 879b72327d..73c136bb93 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -109,7 +109,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Load and Start Appwrite - timeout-minutes: 3 + timeout-minutes: 5 run: | docker load --input /tmp/${{ env.IMAGE }}.tar docker compose pull --quiet --ignore-buildable @@ -149,7 +149,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Load and Start Appwrite - timeout-minutes: 3 + timeout-minutes: 5 run: | docker load --input /tmp/${{ env.IMAGE }}.tar docker compose pull --quiet --ignore-buildable From 7dfe44cb363a8a4350e4339fbc504f794143959f Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Wed, 11 Mar 2026 22:44:42 +0000 Subject: [PATCH 17/21] Run abuse-enabled tests across entire test suite, not just Projects The abuseEnabled jobs previously only ran tests in Services/Projects, missing the Account abuse test and any future abuseEnabled tests in other services. Also rename jobs to "Abuse" for consistency. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/tests.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 73c136bb93..c13370f3f0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -387,7 +387,7 @@ jobs: docker compose logs openruntimes-executor e2e_abuse_enabled: - name: E2E Service Test (Abuse enabled) + name: E2E Service Test (Abuse) runs-on: ubuntu-latest needs: setup permissions: @@ -420,12 +420,12 @@ jobs: docker compose pull --quiet --ignore-buildable docker compose up -d --quiet-pull --wait - - name: Run Projects tests in dedicated table mode + - name: Run abuse-enabled tests in dedicated table mode timeout-minutes: 15 run: >- docker compose exec -T -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" - appwrite test /usr/src/code/tests/e2e/Services/Projects --group=abuseEnabled + appwrite test /usr/src/code/tests/e2e --group=abuseEnabled - name: Failure Logs if: failure() @@ -436,7 +436,7 @@ jobs: docker compose logs openruntimes-executor e2e_abuse_enabled_shared_mode: - name: E2E Shared Mode Service Test (Abuse enabled) + name: E2E Shared Mode Service Test (Abuse) runs-on: ubuntu-latest needs: [ setup, check_database_changes ] if: needs.check_database_changes.outputs.database_changed == 'true' @@ -477,12 +477,12 @@ jobs: docker compose pull --quiet --ignore-buildable docker compose up -d --quiet-pull --wait - - name: Run Projects tests in ${{ matrix.tables-mode }} table mode + - name: Run abuse-enabled tests in ${{ matrix.tables-mode }} table mode timeout-minutes: 15 run: >- docker compose exec -T -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" - appwrite test /usr/src/code/tests/e2e/Services/Projects --group=abuseEnabled + appwrite test /usr/src/code/tests/e2e --group=abuseEnabled - name: Failure Logs if: failure() From 89419344c2b3f045d5ce8c048eb1dd2a7782c4de Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Wed, 11 Mar 2026 23:20:51 +0000 Subject: [PATCH 18/21] Restore MariaDB defaults, fix remaining timeouts, filter listener span logs - Change .env defaults back from MongoDB to MariaDB - Bump all remaining "Load and Start Appwrite" timeouts from 3 to 5 minutes - Filter listener.* span logs to only export on error Co-Authored-By: Claude Opus 4.6 --- .env | 8 ++++---- .github/workflows/tests.yml | 12 ++++++------ app/init/span.php | 7 ++++++- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/.env b/.env index 0df9cb42f4..3c8bef5b68 100644 --- a/.env +++ b/.env @@ -39,10 +39,10 @@ _APP_REDIS_HOST=redis _APP_REDIS_PORT=6379 _APP_REDIS_PASS= _APP_REDIS_USER= -COMPOSE_PROFILES=mongodb -_APP_DB_ADAPTER=mongodb -_APP_DB_HOST=mongodb -_APP_DB_PORT=27017 +COMPOSE_PROFILES=mariadb +_APP_DB_ADAPTER=mariadb +_APP_DB_HOST=mariadb +_APP_DB_PORT=3306 _APP_DB_SCHEMA=appwrite _APP_DB_USER=user _APP_DB_PASS=password diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c13370f3f0..9f2556f3e5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -250,7 +250,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Load and Start Appwrite - timeout-minutes: 3 + timeout-minutes: 5 env: _APP_BROWSER_HOST: http://invalid-browser/v1 _APP_DATABASE_SHARED_TABLES: "" @@ -346,7 +346,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Load and Start Appwrite - timeout-minutes: 3 + timeout-minutes: 5 env: _APP_DATABASE_SHARED_TABLES: database_db_main _APP_DATABASE_SHARED_TABLES_V1: ${{ matrix.tables-mode == 'Shared V1' && 'database_db_main' || '' }} @@ -410,7 +410,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Load and Start Appwrite - timeout-minutes: 3 + timeout-minutes: 5 env: _APP_OPTIONS_ABUSE: enabled _APP_DATABASE_SHARED_TABLES: "" @@ -467,7 +467,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Load and Start Appwrite - timeout-minutes: 3 + timeout-minutes: 5 env: _APP_OPTIONS_ABUSE: enabled _APP_DATABASE_SHARED_TABLES: database_db_main @@ -516,7 +516,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Load and Start Appwrite - timeout-minutes: 3 + timeout-minutes: 5 env: _APP_DATABASE_SHARED_TABLES: "" _APP_DATABASE_SHARED_TABLES_V1: "" @@ -580,7 +580,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Load and Start Appwrite - timeout-minutes: 3 + timeout-minutes: 5 env: _APP_DATABASE_SHARED_TABLES: database_db_main _APP_DATABASE_SHARED_TABLES_V1: ${{ matrix.tables-mode == 'Shared V1' && 'database_db_main' || '' }} diff --git a/app/init/span.php b/app/init/span.php index 76f37f5300..8afa01b2df 100644 --- a/app/init/span.php +++ b/app/init/span.php @@ -5,4 +5,9 @@ use Utopia\Span\Span; use Utopia\Span\Storage; Span::setStorage(new Storage\Coroutine()); -Span::addExporter(new Exporter\Pretty()); +Span::addExporter(new Exporter\Pretty(), function (Span $span): bool { + if (\str_starts_with($span->getAction(), 'listener.')) { + return $span->getError() !== null; + } + return true; +}); From 8cb36835cc4eaa92345bae1b2413e7aa89b11d41 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Wed, 11 Mar 2026 23:41:26 +0000 Subject: [PATCH 19/21] Restore php-retry action for flaky test resilience Re-add itznotabug/php-retry@v3 wrapping all test steps with max_attempts: 2 and retry_wait_seconds: 300. Also restore pull-requests: write permission needed by the action. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/tests.yml | 135 ++++++++++++++++++++++++++---------- 1 file changed, 100 insertions(+), 35 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9f2556f3e5..20d3c71a9a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -90,6 +90,7 @@ jobs: needs: setup permissions: contents: read + pull-requests: write steps: - name: checkout @@ -119,11 +120,18 @@ jobs: run: docker compose exec -T appwrite vars - name: Run Unit Tests - timeout-minutes: 15 - run: >- - docker compose exec - -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" - appwrite test /usr/src/code/tests/unit + uses: itznotabug/php-retry@v3 + with: + max_attempts: 2 + retry_wait_seconds: 300 + timeout_minutes: 15 + job_id: ${{ job.check_run_id }} + github_token: ${{ secrets.GITHUB_TOKEN }} + test_dir: tests/unit + command: >- + docker compose exec + -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" + appwrite test /usr/src/code/tests/unit e2e_general_test: name: E2E General Test @@ -131,6 +139,7 @@ jobs: needs: setup permissions: contents: read + pull-requests: write steps: - name: checkout uses: actions/checkout@v6 @@ -164,11 +173,19 @@ jobs: done - name: Run General Tests - timeout-minutes: 15 - run: >- - docker compose exec -T - -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" - appwrite test /usr/src/code/tests/e2e/General + uses: itznotabug/php-retry@v3 + with: + max_attempts: 2 + retry_wait_seconds: 300 + timeout_minutes: 15 + job_id: ${{ job.check_run_id }} + github_token: ${{ secrets.GITHUB_TOKEN }} + test_dir: tests/e2e/General + command: >- + docker compose exec -T + -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" + appwrite test /usr/src/code/tests/e2e/General + - name: Failure Logs if: failure() run: | @@ -181,6 +198,7 @@ jobs: needs: setup permissions: contents: read + pull-requests: write strategy: fail-fast: false matrix: @@ -228,7 +246,7 @@ jobs: run: | DB_ADAPTER_LOWER=$(echo "${{ matrix.db_adapter }}" | tr 'A-Z' 'a-z') echo "COMPOSE_PROFILES=${DB_ADAPTER_LOWER}" >> $GITHUB_ENV - + if [ "${{ matrix.db_adapter }}" = "MARIADB" ]; then echo "_APP_DB_ADAPTER=mariadb" >> $GITHUB_ENV echo "_APP_DB_HOST=mariadb" >> $GITHUB_ENV @@ -269,8 +287,15 @@ jobs: done - name: Run ${{ matrix.service }} tests with Project table mode - timeout-minutes: 20 - run: | + uses: itznotabug/php-retry@v3 + with: + max_attempts: 2 + retry_wait_seconds: 300 + timeout_minutes: 20 + job_id: ${{ job.check_run_id }} + github_token: ${{ secrets.GITHUB_TOKEN }} + test_dir: tests/e2e/Services/${{ matrix.service }} + command: | SERVICE_PATH="/usr/src/code/tests/e2e/Services/${{ matrix.service }}" # Services that rely on sequential test method execution (shared static state) @@ -296,6 +321,7 @@ jobs: if: needs.check_database_changes.outputs.database_changed == 'true' permissions: contents: read + pull-requests: write strategy: fail-fast: false matrix: @@ -364,8 +390,15 @@ jobs: done - name: Run ${{ matrix.service }} tests with ${{ matrix.tables-mode }} table mode - timeout-minutes: 20 - run: | + uses: itznotabug/php-retry@v3 + with: + max_attempts: 2 + retry_wait_seconds: 300 + timeout_minutes: 20 + job_id: ${{ job.check_run_id }} + github_token: ${{ secrets.GITHUB_TOKEN }} + test_dir: tests/e2e/Services/${{ matrix.service }} + command: | SERVICE_PATH="/usr/src/code/tests/e2e/Services/${{ matrix.service }}" # Services that rely on sequential test method execution (shared static state) @@ -392,6 +425,7 @@ jobs: needs: setup permissions: contents: read + pull-requests: write steps: - name: checkout uses: actions/checkout@v6 @@ -421,11 +455,18 @@ jobs: docker compose up -d --quiet-pull --wait - name: Run abuse-enabled tests in dedicated table mode - timeout-minutes: 15 - run: >- - docker compose exec -T - -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" - appwrite test /usr/src/code/tests/e2e --group=abuseEnabled + uses: itznotabug/php-retry@v3 + with: + max_attempts: 2 + retry_wait_seconds: 300 + timeout_minutes: 15 + job_id: ${{ job.check_run_id }} + github_token: ${{ secrets.GITHUB_TOKEN }} + test_dir: tests/e2e + command: >- + docker compose exec -T + -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" + appwrite test /usr/src/code/tests/e2e --group=abuseEnabled - name: Failure Logs if: failure() @@ -442,6 +483,7 @@ jobs: if: needs.check_database_changes.outputs.database_changed == 'true' permissions: contents: read + pull-requests: write strategy: fail-fast: false matrix: @@ -478,11 +520,18 @@ jobs: docker compose up -d --quiet-pull --wait - name: Run abuse-enabled tests in ${{ matrix.tables-mode }} table mode - timeout-minutes: 15 - run: >- - docker compose exec -T - -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" - appwrite test /usr/src/code/tests/e2e --group=abuseEnabled + uses: itznotabug/php-retry@v3 + with: + max_attempts: 2 + retry_wait_seconds: 300 + timeout_minutes: 15 + job_id: ${{ job.check_run_id }} + github_token: ${{ secrets.GITHUB_TOKEN }} + test_dir: tests/e2e + command: >- + docker compose exec -T + -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" + appwrite test /usr/src/code/tests/e2e --group=abuseEnabled - name: Failure Logs if: failure() @@ -498,6 +547,7 @@ jobs: needs: setup permissions: contents: read + pull-requests: write steps: - name: checkout uses: actions/checkout@v6 @@ -534,11 +584,18 @@ jobs: done - name: Run Site tests with browser connected in dedicated table mode - timeout-minutes: 15 - run: >- - docker compose exec -T - -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" - appwrite test /usr/src/code/tests/e2e/Services/Sites --group=screenshots + uses: itznotabug/php-retry@v3 + with: + max_attempts: 2 + retry_wait_seconds: 300 + timeout_minutes: 15 + job_id: ${{ job.check_run_id }} + github_token: ${{ secrets.GITHUB_TOKEN }} + test_dir: tests/e2e/Services/Sites + command: >- + docker compose exec -T + -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" + appwrite test /usr/src/code/tests/e2e/Services/Sites --group=screenshots - name: Failure Logs if: failure() @@ -555,6 +612,7 @@ jobs: if: needs.check_database_changes.outputs.database_changed == 'true' permissions: contents: read + pull-requests: write strategy: fail-fast: false matrix: @@ -598,11 +656,18 @@ jobs: done - name: Run Site tests with browser connected in ${{ matrix.tables-mode }} table mode - timeout-minutes: 15 - run: >- - docker compose exec -T - -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" - appwrite test /usr/src/code/tests/e2e/Services/Sites --group=screenshots + uses: itznotabug/php-retry@v3 + with: + max_attempts: 2 + retry_wait_seconds: 300 + timeout_minutes: 15 + job_id: ${{ job.check_run_id }} + github_token: ${{ secrets.GITHUB_TOKEN }} + test_dir: tests/e2e/Services/Sites + command: >- + docker compose exec -T + -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" + appwrite test /usr/src/code/tests/e2e/Services/Sites --group=screenshots - name: Failure Logs if: failure() From 9f4ba3a4a285042b8e79327be96d81a0ac51db09 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Wed, 11 Mar 2026 23:47:03 +0000 Subject: [PATCH 20/21] Reduce php-retry wait time from 300s to 60s Co-Authored-By: Claude Opus 4.6 --- .github/workflows/tests.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 20d3c71a9a..1b112eebbd 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -123,7 +123,7 @@ jobs: uses: itznotabug/php-retry@v3 with: max_attempts: 2 - retry_wait_seconds: 300 + retry_wait_seconds: 60 timeout_minutes: 15 job_id: ${{ job.check_run_id }} github_token: ${{ secrets.GITHUB_TOKEN }} @@ -176,7 +176,7 @@ jobs: uses: itznotabug/php-retry@v3 with: max_attempts: 2 - retry_wait_seconds: 300 + retry_wait_seconds: 60 timeout_minutes: 15 job_id: ${{ job.check_run_id }} github_token: ${{ secrets.GITHUB_TOKEN }} @@ -290,7 +290,7 @@ jobs: uses: itznotabug/php-retry@v3 with: max_attempts: 2 - retry_wait_seconds: 300 + retry_wait_seconds: 60 timeout_minutes: 20 job_id: ${{ job.check_run_id }} github_token: ${{ secrets.GITHUB_TOKEN }} @@ -393,7 +393,7 @@ jobs: uses: itznotabug/php-retry@v3 with: max_attempts: 2 - retry_wait_seconds: 300 + retry_wait_seconds: 60 timeout_minutes: 20 job_id: ${{ job.check_run_id }} github_token: ${{ secrets.GITHUB_TOKEN }} @@ -458,7 +458,7 @@ jobs: uses: itznotabug/php-retry@v3 with: max_attempts: 2 - retry_wait_seconds: 300 + retry_wait_seconds: 60 timeout_minutes: 15 job_id: ${{ job.check_run_id }} github_token: ${{ secrets.GITHUB_TOKEN }} @@ -523,7 +523,7 @@ jobs: uses: itznotabug/php-retry@v3 with: max_attempts: 2 - retry_wait_seconds: 300 + retry_wait_seconds: 60 timeout_minutes: 15 job_id: ${{ job.check_run_id }} github_token: ${{ secrets.GITHUB_TOKEN }} @@ -587,7 +587,7 @@ jobs: uses: itznotabug/php-retry@v3 with: max_attempts: 2 - retry_wait_seconds: 300 + retry_wait_seconds: 60 timeout_minutes: 15 job_id: ${{ job.check_run_id }} github_token: ${{ secrets.GITHUB_TOKEN }} @@ -659,7 +659,7 @@ jobs: uses: itznotabug/php-retry@v3 with: max_attempts: 2 - retry_wait_seconds: 300 + retry_wait_seconds: 60 timeout_minutes: 15 job_id: ${{ job.check_run_id }} github_token: ${{ secrets.GITHUB_TOKEN }} From f09b9a994eaefed1ec506db792facc823d707858 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Wed, 11 Mar 2026 23:59:31 +0000 Subject: [PATCH 21/21] Revert .env defaults back to MongoDB Co-Authored-By: Claude Opus 4.6 --- .env | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.env b/.env index 3c8bef5b68..0df9cb42f4 100644 --- a/.env +++ b/.env @@ -39,10 +39,10 @@ _APP_REDIS_HOST=redis _APP_REDIS_PORT=6379 _APP_REDIS_PASS= _APP_REDIS_USER= -COMPOSE_PROFILES=mariadb -_APP_DB_ADAPTER=mariadb -_APP_DB_HOST=mariadb -_APP_DB_PORT=3306 +COMPOSE_PROFILES=mongodb +_APP_DB_ADAPTER=mongodb +_APP_DB_HOST=mongodb +_APP_DB_PORT=27017 _APP_DB_SCHEMA=appwrite _APP_DB_USER=user _APP_DB_PASS=password