From bfc4f72673093f183fadd43717a5ffa9e82a89a9 Mon Sep 17 00:00:00 2001 From: Bradley Schofield Date: Mon, 24 Jan 2022 10:32:40 +0000 Subject: [PATCH] Update docker-compose in docs and make executor a executable Update docker-compose in docs and make executor a executable --- Dockerfile | 3 ++- app/views/install/compose.phtml | 48 +++++++++++++++++++++++++++++++++ bin/executor | 3 +++ docker-compose.yml | 12 +++------ 4 files changed, 56 insertions(+), 10 deletions(-) create mode 100644 bin/executor diff --git a/Dockerfile b/Dockerfile index a9f1b0fb2..37f391fe2 100755 --- a/Dockerfile +++ b/Dockerfile @@ -270,7 +270,8 @@ RUN chmod +x /usr/local/bin/doctor && \ chmod +x /usr/local/bin/worker-deletes && \ chmod +x /usr/local/bin/worker-functions && \ chmod +x /usr/local/bin/worker-mails && \ - chmod +x /usr/local/bin/worker-webhooks + chmod +x /usr/local/bin/worker-webhooks && \ + chmod +x /usr/local/bin/executor # Letsencrypt Permissions RUN mkdir -p /etc/letsencrypt/live/ && chmod -Rf 755 /etc/letsencrypt/live/ diff --git a/app/views/install/compose.phtml b/app/views/install/compose.phtml index 1252fdfd7..b4b4b492f 100644 --- a/app/views/install/compose.phtml +++ b/app/views/install/compose.phtml @@ -350,6 +350,52 @@ services: - _APP_FUNCTIONS_RUNTIMES - _APP_USAGE_STATS + appwrite-executor: + container_name: appwrite-executor + entrypoint: executor + stop_signal: SIGINT + image: /: + networks: + appwrite: + runtimes: + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - appwrite-functions:/storage/functions:rw + - /tmp:/tmp:rw + - ./app:/usr/src/code/app + - ./src:/usr/src/code/src + - ./dev:/usr/local/dev + depends_on: + - redis + - mariadb + environment: + - _APP_ENV + - _APP_OPENSSL_KEY_V1 + - _APP_REDIS_HOST + - _APP_REDIS_PORT + - _APP_REDIS_USER + - _APP_REDIS_PASS + - _APP_DB_HOST + - _APP_DB_PORT + - _APP_DB_SCHEMA + - _APP_DB_USER + - _APP_DB_PASS + - _APP_FUNCTIONS_TIMEOUT + - _APP_FUNCTIONS_BUILD_TIMEOUT + - _APP_FUNCTIONS_CONTAINERS + - _APP_FUNCTIONS_RUNTIMES + - _APP_FUNCTIONS_CPUS + - _APP_FUNCTIONS_MEMORY + - _APP_FUNCTIONS_MEMORY_SWAP + - _APP_EXECUTOR_SECRET + - _APP_USAGE_STATS + - _APP_STATSD_HOST + - _APP_STATSD_PORT + - _APP_LOGGING_PROVIDER + - _APP_LOGGING_CONFIG + - DOCKERHUB_PULL_USERNAME + - DOCKERHUB_PULL_PASSWORD + appwrite-worker-mails: image: /: entrypoint: worker-mails @@ -485,6 +531,7 @@ services: networks: gateway: appwrite: + runtimes: volumes: appwrite-mariadb: @@ -495,3 +542,4 @@ volumes: appwrite-functions: appwrite-influxdb: appwrite-config: + appwrite-executor: \ No newline at end of file diff --git a/bin/executor b/bin/executor new file mode 100644 index 000000000..f08bd68e4 --- /dev/null +++ b/bin/executor @@ -0,0 +1,3 @@ +#!/bin/sh + +php -e /usr/src/code/app/executor.php -dopcache.preload=opcache.preload=/usr/src/code/app/preload.php \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 97fe60c81..584c65fe8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -360,14 +360,8 @@ services: appwrite-executor: container_name: appwrite-executor - entrypoint: - - php - - -e - - /usr/src/code/app/executor.php - - -dopcache.preload=opcache.preload=/usr/src/code/app/preload.php + entrypoint: executor stop_signal: SIGINT - ports: - - "8080:8080" build: context: . args: @@ -410,10 +404,10 @@ services: - _APP_USAGE_STATS - _APP_STATSD_HOST - _APP_STATSD_PORT - - DOCKERHUB_PULL_USERNAME - - DOCKERHUB_PULL_PASSWORD - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG + - DOCKERHUB_PULL_USERNAME + - DOCKERHUB_PULL_PASSWORD appwrite-worker-mails: entrypoint: worker-mails