mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
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 <noreply@anthropic.com>
This commit is contained in:
1 parent
0bbcc3f570
commit
33ce469ab0
2 files changed
+21
-48
No files matched your search
+16
-48
@@ -109,15 +109,11 @@ jobs:
|
|||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Load and Start Appwrite
|
- name: Load and Start Appwrite
|
||||||
timeout-minutes: 10
|
timeout-minutes: 3
|
||||||
run: |
|
run: |
|
||||||
docker load --input /tmp/${{ env.IMAGE }}.tar
|
docker load --input /tmp/${{ env.IMAGE }}.tar
|
||||||
docker compose pull --quiet --ignore-buildable
|
docker compose pull --quiet --ignore-buildable
|
||||||
docker compose up -d
|
docker compose up -d --quiet-pull --wait
|
||||||
until docker compose exec -T appwrite doctor > /dev/null 2>&1; do
|
|
||||||
echo "Waiting for Appwrite to be ready..."
|
|
||||||
sleep 2
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: Environment Variables
|
- name: Environment Variables
|
||||||
run: docker compose exec -T appwrite vars
|
run: docker compose exec -T appwrite vars
|
||||||
@@ -153,15 +149,11 @@ jobs:
|
|||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Load and Start Appwrite
|
- name: Load and Start Appwrite
|
||||||
timeout-minutes: 10
|
timeout-minutes: 3
|
||||||
run: |
|
run: |
|
||||||
docker load --input /tmp/${{ env.IMAGE }}.tar
|
docker load --input /tmp/${{ env.IMAGE }}.tar
|
||||||
docker compose pull --quiet --ignore-buildable
|
docker compose pull --quiet --ignore-buildable
|
||||||
docker compose up -d
|
docker compose up -d --quiet-pull --wait
|
||||||
until docker compose exec -T appwrite doctor > /dev/null 2>&1; do
|
|
||||||
echo "Waiting for Appwrite to be ready..."
|
|
||||||
sleep 2
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: Wait for Open Runtimes
|
- name: Wait for Open Runtimes
|
||||||
timeout-minutes: 3
|
timeout-minutes: 3
|
||||||
@@ -259,7 +251,7 @@ jobs:
|
|||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Load and Start Appwrite
|
- name: Load and Start Appwrite
|
||||||
timeout-minutes: 10
|
timeout-minutes: 3
|
||||||
env:
|
env:
|
||||||
_APP_BROWSER_HOST: http://invalid-browser/v1
|
_APP_BROWSER_HOST: http://invalid-browser/v1
|
||||||
_APP_DATABASE_SHARED_TABLES: ""
|
_APP_DATABASE_SHARED_TABLES: ""
|
||||||
@@ -267,11 +259,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
docker load --input /tmp/${{ env.IMAGE }}.tar
|
docker load --input /tmp/${{ env.IMAGE }}.tar
|
||||||
docker compose pull --quiet --ignore-buildable
|
docker compose pull --quiet --ignore-buildable
|
||||||
docker compose up -d
|
docker compose up -d --quiet-pull --wait
|
||||||
until docker compose exec -T appwrite doctor > /dev/null 2>&1; do
|
|
||||||
echo "Waiting for Appwrite to be ready..."
|
|
||||||
sleep 2
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: Wait for Open Runtimes
|
- name: Wait for Open Runtimes
|
||||||
timeout-minutes: 3
|
timeout-minutes: 3
|
||||||
@@ -359,18 +347,14 @@ jobs:
|
|||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Load and Start Appwrite
|
- name: Load and Start Appwrite
|
||||||
timeout-minutes: 10
|
timeout-minutes: 3
|
||||||
env:
|
env:
|
||||||
_APP_DATABASE_SHARED_TABLES: database_db_main
|
_APP_DATABASE_SHARED_TABLES: database_db_main
|
||||||
_APP_DATABASE_SHARED_TABLES_V1: ${{ matrix.tables-mode == 'Shared V1' && 'database_db_main' || '' }}
|
_APP_DATABASE_SHARED_TABLES_V1: ${{ matrix.tables-mode == 'Shared V1' && 'database_db_main' || '' }}
|
||||||
run: |
|
run: |
|
||||||
docker load --input /tmp/${{ env.IMAGE }}.tar
|
docker load --input /tmp/${{ env.IMAGE }}.tar
|
||||||
docker compose pull --quiet --ignore-buildable
|
docker compose pull --quiet --ignore-buildable
|
||||||
docker compose up -d
|
docker compose up -d --quiet-pull --wait
|
||||||
until docker compose exec -T appwrite doctor > /dev/null 2>&1; do
|
|
||||||
echo "Waiting for Appwrite to be ready..."
|
|
||||||
sleep 2
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: Wait for Open Runtimes
|
- name: Wait for Open Runtimes
|
||||||
timeout-minutes: 3
|
timeout-minutes: 3
|
||||||
@@ -427,7 +411,7 @@ jobs:
|
|||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Load and Start Appwrite
|
- name: Load and Start Appwrite
|
||||||
timeout-minutes: 10
|
timeout-minutes: 3
|
||||||
env:
|
env:
|
||||||
_APP_OPTIONS_ABUSE: enabled
|
_APP_OPTIONS_ABUSE: enabled
|
||||||
_APP_DATABASE_SHARED_TABLES: ""
|
_APP_DATABASE_SHARED_TABLES: ""
|
||||||
@@ -435,11 +419,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
docker load --input /tmp/${{ env.IMAGE }}.tar
|
docker load --input /tmp/${{ env.IMAGE }}.tar
|
||||||
docker compose pull --quiet --ignore-buildable
|
docker compose pull --quiet --ignore-buildable
|
||||||
docker compose up -d
|
docker compose up -d --quiet-pull --wait
|
||||||
until docker compose exec -T appwrite doctor > /dev/null 2>&1; do
|
|
||||||
echo "Waiting for Appwrite to be ready..."
|
|
||||||
sleep 2
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: Run Projects tests in dedicated table mode
|
- name: Run Projects tests in dedicated table mode
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
@@ -488,7 +468,7 @@ jobs:
|
|||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Load and Start Appwrite
|
- name: Load and Start Appwrite
|
||||||
timeout-minutes: 10
|
timeout-minutes: 3
|
||||||
env:
|
env:
|
||||||
_APP_OPTIONS_ABUSE: enabled
|
_APP_OPTIONS_ABUSE: enabled
|
||||||
_APP_DATABASE_SHARED_TABLES: database_db_main
|
_APP_DATABASE_SHARED_TABLES: database_db_main
|
||||||
@@ -496,11 +476,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
docker load --input /tmp/${{ env.IMAGE }}.tar
|
docker load --input /tmp/${{ env.IMAGE }}.tar
|
||||||
docker compose pull --quiet --ignore-buildable
|
docker compose pull --quiet --ignore-buildable
|
||||||
docker compose up -d
|
docker compose up -d --quiet-pull --wait
|
||||||
until docker compose exec -T appwrite doctor > /dev/null 2>&1; do
|
|
||||||
echo "Waiting for Appwrite to be ready..."
|
|
||||||
sleep 2
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: Run Projects tests in ${{ matrix.tables-mode }} table mode
|
- name: Run Projects tests in ${{ matrix.tables-mode }} table mode
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
@@ -541,18 +517,14 @@ jobs:
|
|||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Load and Start Appwrite
|
- name: Load and Start Appwrite
|
||||||
timeout-minutes: 10
|
timeout-minutes: 3
|
||||||
env:
|
env:
|
||||||
_APP_DATABASE_SHARED_TABLES: ""
|
_APP_DATABASE_SHARED_TABLES: ""
|
||||||
_APP_DATABASE_SHARED_TABLES_V1: ""
|
_APP_DATABASE_SHARED_TABLES_V1: ""
|
||||||
run: |
|
run: |
|
||||||
docker load --input /tmp/${{ env.IMAGE }}.tar
|
docker load --input /tmp/${{ env.IMAGE }}.tar
|
||||||
docker compose pull --quiet --ignore-buildable
|
docker compose pull --quiet --ignore-buildable
|
||||||
docker compose up -d
|
docker compose up -d --quiet-pull --wait
|
||||||
until docker compose exec -T appwrite doctor > /dev/null 2>&1; do
|
|
||||||
echo "Waiting for Appwrite to be ready..."
|
|
||||||
sleep 2
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: Wait for Open Runtimes
|
- name: Wait for Open Runtimes
|
||||||
timeout-minutes: 3
|
timeout-minutes: 3
|
||||||
@@ -609,18 +581,14 @@ jobs:
|
|||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Load and Start Appwrite
|
- name: Load and Start Appwrite
|
||||||
timeout-minutes: 10
|
timeout-minutes: 3
|
||||||
env:
|
env:
|
||||||
_APP_DATABASE_SHARED_TABLES: database_db_main
|
_APP_DATABASE_SHARED_TABLES: database_db_main
|
||||||
_APP_DATABASE_SHARED_TABLES_V1: ${{ matrix.tables-mode == 'Shared V1' && 'database_db_main' || '' }}
|
_APP_DATABASE_SHARED_TABLES_V1: ${{ matrix.tables-mode == 'Shared V1' && 'database_db_main' || '' }}
|
||||||
run: |
|
run: |
|
||||||
docker load --input /tmp/${{ env.IMAGE }}.tar
|
docker load --input /tmp/${{ env.IMAGE }}.tar
|
||||||
docker compose pull --quiet --ignore-buildable
|
docker compose pull --quiet --ignore-buildable
|
||||||
docker compose up -d
|
docker compose up -d --quiet-pull --wait
|
||||||
until docker compose exec -T appwrite doctor > /dev/null 2>&1; do
|
|
||||||
echo "Waiting for Appwrite to be ready..."
|
|
||||||
sleep 2
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: Wait for Open Runtimes
|
- name: Wait for Open Runtimes
|
||||||
timeout-minutes: 3
|
timeout-minutes: 3
|
||||||
|
|||||||
@@ -61,6 +61,11 @@ services:
|
|||||||
container_name: appwrite
|
container_name: appwrite
|
||||||
<<: [*x-logging, *x-build]
|
<<: [*x-logging, *x-build]
|
||||||
image: appwrite-dev
|
image: appwrite-dev
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "doctor"]
|
||||||
|
interval: 5s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 12
|
||||||
ports:
|
ports:
|
||||||
- 9501:80
|
- 9501:80
|
||||||
networks:
|
networks:
|
||||||
|
|||||||
Reference in new issue
Block a user