diff --git a/.env b/.env index 88dec63b1c..7d0b111b6d 100644 --- a/.env +++ b/.env @@ -86,8 +86,9 @@ _APP_COMPUTE_INACTIVE_THRESHOLD=600 _APP_COMPUTE_MAINTENANCE_INTERVAL=600 _APP_COMPUTE_RUNTIMES_NETWORK=runtimes _APP_EXECUTOR_SECRET=your-secret-key -_APP_EXECUTOR_HOST=http://exc1/v1 +_APP_EXECUTOR_HOST=http://executor/v1 _APP_BROWSER_HOST=http://appwrite-browser:3000/v1 +_OPR_EXECUTOR_IMAGES=openruntimes/static:v5-1,openruntimes/node:v5-22 _APP_FUNCTIONS_RUNTIMES=node-22 _APP_SITES_RUNTIMES=static-1,node-22 _APP_MAINTENANCE_INTERVAL=86400 @@ -126,4 +127,4 @@ _APP_WEBHOOK_MAX_FAILED_ATTEMPTS=10 _APP_PROJECT_REGIONS=default _APP_FUNCTIONS_CREATION_ABUSE_LIMIT=5000 _APP_STATS_USAGE_DUAL_WRITING_DBS=database_db_main -_APP_TRUSTED_HEADERS=x-forwarded-for \ No newline at end of file +_APP_TRUSTED_HEADERS=x-forwarded-for diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 509e1f5b29..07f351f48a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -134,14 +134,6 @@ jobs: docker compose up -d sleep 10 - - name: Wait for Open Runtimes - timeout-minutes: 3 - run: | - while ! docker compose logs openruntimes-executor | grep -q "Executor is ready."; do - echo "Waiting for Executor to come online" - sleep 1 - done - - name: Run General Tests run: | docker compose exec -T \ @@ -205,14 +197,6 @@ jobs: docker compose up -d sleep 30 - - name: Wait for Open Runtimes - timeout-minutes: 3 - run: | - while ! docker compose logs openruntimes-executor | grep -q "Executor is ready."; do - echo "Waiting for Executor to come online" - sleep 1 - done - - name: Run ${{ matrix.service }} tests with Project table mode run: | echo "Using project tables" @@ -288,14 +272,6 @@ jobs: docker compose up -d sleep 30 - - name: Wait for Open Runtimes - timeout-minutes: 3 - run: | - while ! docker compose logs openruntimes-executor | grep -q "Executor is ready."; do - echo "Waiting for Executor to come online" - sleep 1 - done - - name: Run ${{ matrix.service }} tests with ${{ matrix.tables-mode }} table mode run: | if [ "${{ matrix.tables-mode }}" == "Shared V1" ]; then diff --git a/app/config/variables.php b/app/config/variables.php index 653e959101..66c880101a 100644 --- a/app/config/variables.php +++ b/app/config/variables.php @@ -955,7 +955,7 @@ return [ 'name' => '_APP_EXECUTOR_HOST', 'description' => 'The host used by Appwrite to communicate with the function executor.', 'introduction' => '0.13.0', - 'default' => 'http://exc1/v1', + 'default' => 'http://executor/v1', 'required' => false, 'overwrite' => true, 'question' => '', diff --git a/app/views/install/compose.phtml b/app/views/install/compose.phtml index 80d4e5e2d6..a363c367eb 100644 --- a/app/views/install/compose.phtml +++ b/app/views/install/compose.phtml @@ -871,11 +871,11 @@ $enableAssistant = $this->getParam('enableAssistant', false); openruntimes-executor: container_name: openruntimes-executor - hostname: exc1 + hostname: executor <<: *x-logging restart: unless-stopped stop_signal: SIGINT - image: openruntimes/executor:0.7.22 + image: openruntimes/executor:0.19.0 networks: - appwrite - runtimes diff --git a/docker-compose.yml b/docker-compose.yml index 20c0ad8f79..ade19ff751 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -637,9 +637,12 @@ services: - ./app:/usr/src/code/app - ./src:/usr/src/code/src depends_on: - - redis - - mariadb - - openruntimes-executor + redis: + condition: service_started + mariadb: + condition: service_started + openruntimes-executor: + condition: service_healthy environment: - _APP_ENV - _APP_WORKER_PER_CORE @@ -1072,12 +1075,15 @@ services: - appwrite openruntimes-executor: - container_name: openruntimes-executor - hostname: exc1 + hostname: executor <<: *x-logging - stop_signal: SIGINT - image: openruntimes/executor:0.11.4 + image: openruntimes/executor:0.19.0 restart: unless-stopped + healthcheck: + test: curl -sf http://127.0.0.1:80/v1/health || exit 1 + interval: 5s + timeout: 5s + retries: 30 networks: - appwrite - runtimes @@ -1090,14 +1096,13 @@ services: # It's not possible to share mount file between 2 containers without host mount (copying is too slow) - /tmp:/tmp:rw environment: - - OPR_EXECUTOR_IMAGE_PULL=enabled - OPR_EXECUTOR_INACTIVE_TRESHOLD=$_APP_COMPUTE_INACTIVE_THRESHOLD - OPR_EXECUTOR_MAINTENANCE_INTERVAL=$_APP_COMPUTE_MAINTENANCE_INTERVAL - OPR_EXECUTOR_NETWORK=$_APP_COMPUTE_RUNTIMES_NETWORK - OPR_EXECUTOR_DOCKER_HUB_USERNAME=$_APP_DOCKER_HUB_USERNAME - OPR_EXECUTOR_DOCKER_HUB_PASSWORD=$_APP_DOCKER_HUB_PASSWORD - OPR_EXECUTOR_ENV=$_APP_ENV - - OPR_EXECUTOR_RUNTIMES=$_APP_FUNCTIONS_RUNTIMES,$_APP_SITES_RUNTIMES + - OPR_EXECUTOR_IMAGES=$_OPR_EXECUTOR_IMAGES - OPR_EXECUTOR_SECRET=$_APP_EXECUTOR_SECRET - OPR_EXECUTOR_RUNTIME_VERSIONS=v5 - OPR_EXECUTOR_LOGGING_CONFIG=$_APP_LOGGING_CONFIG