From 1bcea96f67b478bedf3d279df043912cecf90886 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Mon, 20 Jul 2020 18:40:12 +0300 Subject: [PATCH 01/10] POC --- Dockerfile | 71 ++++++++++++++++++++++++++---------------------------- 1 file changed, 34 insertions(+), 37 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9c2b3a214d..31cfd80858 100755 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ RUN composer update --ignore-platform-reqs --optimize-autoloader \ --no-plugins --no-scripts --prefer-dist \ `if [ "$TESTING" != "true" ]; then echo "--no-dev"; fi` -FROM php:7.4-cli as step1 +FROM php:7.4-cli-alpine as step1 ENV TZ=Asia/Tel_Aviv \ DEBIAN_FRONTEND=noninteractive \ @@ -21,8 +21,19 @@ ENV TZ=Asia/Tel_Aviv \ PHP_XDEBUG_VERSION=sdebug_2_9-beta RUN \ - apt-get update && \ - apt-get install -y --no-install-recommends --no-install-suggests ca-certificates software-properties-common wget git openssl make zip unzip libbrotli-dev libz-dev + apk add \ + make \ + automake \ + autoconf \ + gcc \ + g++ \ + tar \ + wget \ + git \ + brotli + + #ca-certificates \ + # software-properties-common wget git openssl make zip unzip libbrotli-dev libz-dev RUN docker-php-ext-install sockets @@ -43,24 +54,8 @@ RUN \ ./configure --enable-sockets --enable-http2 && \ make && make install && \ cd .. - ## XDebug Extension - # git clone https://github.com/swoole/sdebug.git && \ - # cd sdebug && \ - # git checkout $PHP_XDEBUG_VERSION && \ - # phpize && \ - # ./configure --enable-xdebug && \ - # make clean && make && make install - # cd .. && \ - # Meminfo Extension - # git clone https://github.com/BitOne/php-meminfo.git && \ - # cd php-meminfo && \ - # git checkout v1.0.5 && \ - # cd extension/php7 && \ - # phpize && \ - # ./configure --enable-meminfo && \ - # make && make install -FROM php:7.4-cli as final +FROM php:7.4-cli-alpine as final LABEL maintainer="team@appwrite.io" @@ -103,11 +98,25 @@ ENV TZ=Asia/Tel_Aviv \ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone RUN \ - apt-get update && \ - apt-get install -y --no-install-recommends --no-install-suggests webp certbot htop procps docker.io \ - libonig-dev libcurl4-gnutls-dev libmagickwand-dev libyaml-dev libbrotli-dev libz-dev && \ - pecl install imagick yaml && \ - docker-php-ext-enable imagick yaml + apk update && apk add \ + make \ + automake \ + autoconf \ + gcc \ + g++ \ + libwebp \ + certbot \ + htop \ + procps \ + docker \ + oniguruma-dev \ + curl-dev \ + imagemagick-dev \ + yaml-dev \ + brotli \ + zlib-dev \ + && pecl install imagick yaml \ + && docker-php-ext-enable imagick yaml RUN docker-php-ext-install sockets curl opcache pdo pdo_mysql @@ -116,8 +125,6 @@ WORKDIR /usr/src/code COPY --from=step0 /usr/local/src/vendor /usr/src/code/vendor COPY --from=step1 /usr/local/lib/php/extensions/no-debug-non-zts-20190902/swoole.so /usr/local/lib/php/extensions/no-debug-non-zts-20190902/ COPY --from=step1 /usr/local/lib/php/extensions/no-debug-non-zts-20190902/redis.so /usr/local/lib/php/extensions/no-debug-non-zts-20190902/ -# COPY --from=step1 /usr/local/lib/php/extensions/no-debug-non-zts-20190902/xdebug.so /usr/local/lib/php/extensions/no-debug-non-zts-20190902/ -# COPY --from=step1 /usr/local/lib/php/extensions/no-debug-non-zts-20190902/meminfo.so /usr/local/lib/php/extensions/no-debug-non-zts-20190902/ # Add Source Code COPY ./app /usr/src/code/app @@ -160,21 +167,11 @@ RUN mkdir -p /etc/letsencrypt/live/ && chmod -Rf 755 /etc/letsencrypt/live/ # Enable Extensions RUN echo extension=swoole.so >> /usr/local/etc/php/conf.d/swoole.ini RUN echo extension=redis.so >> /usr/local/etc/php/conf.d/redis.ini -# RUN echo zend_extension=xdebug.so >> /usr/local/etc/php/conf.d/xdebug.ini -# RUN echo extension=meminfo.so >> /usr/local/etc/php/conf.d/meminfo.ini RUN echo "opcache.preload_user=www-data" >> /usr/local/etc/php/conf.d/appwrite.ini RUN echo "opcache.preload=/usr/src/code/app/preload.php" >> /usr/local/etc/php/conf.d/appwrite.ini RUN echo "opcache.enable_cli = 1" >> /usr/local/etc/php/conf.d/appwrite.ini -# RUN echo "xdebug.profiler_enable = 1" >> /usr/local/etc/php/conf.d/appwrite.ini -# RUN echo "xdebug.profiler_output_dir = /tmp/" >> /usr/local/etc/php/conf.d/appwrite.ini -# RUN echo "xdebug.profiler_enable_trigger = 1" >> /usr/local/etc/php/conf.d/appwrite.ini -# RUN echo "xdebug.trace_format = 1" >> /usr/local/etc/php/conf.d/appwrite.ini EXPOSE 80 -#, "-dxdebug.auto_trace=1" -#, "-dxdebug.profiler_enable=1" -#, "-dopcache.preload=opcache.preload=/usr/src/code/app/preload.php" - CMD [ "php", "app/server.php", "-dopcache.preload=opcache.preload=/usr/src/code/app/preload.php" ] From 1c18826f0c9a3b6c2eb4611c40ac2b855442472b Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Mon, 20 Jul 2020 20:16:26 +0300 Subject: [PATCH 02/10] Updated gzip compression --- Dockerfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 31cfd80858..b71a096337 100755 --- a/Dockerfile +++ b/Dockerfile @@ -21,7 +21,7 @@ ENV TZ=Asia/Tel_Aviv \ PHP_XDEBUG_VERSION=sdebug_2_9-beta RUN \ - apk add \ + apk add --no-cache --virtual .deps \ make \ automake \ autoconf \ @@ -30,6 +30,7 @@ RUN \ tar \ wget \ git \ + zlib-dev \ brotli #ca-certificates \ @@ -98,7 +99,7 @@ ENV TZ=Asia/Tel_Aviv \ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone RUN \ - apk update && apk add \ + apk update && apk add --no-cache --virtual .deps \ make \ automake \ autoconf \ @@ -113,8 +114,6 @@ RUN \ curl-dev \ imagemagick-dev \ yaml-dev \ - brotli \ - zlib-dev \ && pecl install imagick yaml \ && docker-php-ext-enable imagick yaml From ccb1743efe3cde55d6992687e1b9e703a20f4f16 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Mon, 20 Jul 2020 20:34:48 +0300 Subject: [PATCH 03/10] Updated imagemagik --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index b71a096337..c4599b3c01 100755 --- a/Dockerfile +++ b/Dockerfile @@ -112,6 +112,8 @@ RUN \ docker \ oniguruma-dev \ curl-dev \ + imagemagick \ + imagemagick-libs \ imagemagick-dev \ yaml-dev \ && pecl install imagick yaml \ From ac2ee0a02597f51141ddcce636fb59437dc526fe Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Mon, 20 Jul 2020 20:53:32 +0300 Subject: [PATCH 04/10] Fixed missing bash --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index c4599b3c01..7ae2345b4d 100755 --- a/Dockerfile +++ b/Dockerfile @@ -100,6 +100,7 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone RUN \ apk update && apk add --no-cache --virtual .deps \ + bash \ make \ automake \ autoconf \ From a295b9c3c6c4d45036cfc5a5ee99d7cdd076c348 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Mon, 20 Jul 2020 23:05:36 +0300 Subject: [PATCH 05/10] Fixed scripts, removed build packages --- Dockerfile | 18 +++++++----------- bin/doctor | 2 +- bin/migrate | 2 +- bin/schedule | 2 +- bin/start | 2 +- bin/test | 2 +- bin/worker-audits | 2 +- bin/worker-certificates | 2 +- bin/worker-deletes | 2 +- bin/worker-functions | 2 +- bin/worker-mails | 2 +- bin/worker-tasks | 2 +- bin/worker-usage | 2 +- bin/worker-webhooks | 2 +- 14 files changed, 20 insertions(+), 24 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7ae2345b4d..9db9da03f6 100755 --- a/Dockerfile +++ b/Dockerfile @@ -33,9 +33,6 @@ RUN \ zlib-dev \ brotli - #ca-certificates \ - # software-properties-common wget git openssl make zip unzip libbrotli-dev libz-dev - RUN docker-php-ext-install sockets RUN \ @@ -100,27 +97,26 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone RUN \ apk update && apk add --no-cache --virtual .deps \ - bash \ make \ automake \ autoconf \ gcc \ g++ \ - libwebp \ certbot \ - htop \ - procps \ + # libwebp \ + # htop \ + # procps \ docker \ - oniguruma-dev \ + # oniguruma-dev \ curl-dev \ imagemagick \ imagemagick-libs \ imagemagick-dev \ yaml-dev \ && pecl install imagick yaml \ - && docker-php-ext-enable imagick yaml - -RUN docker-php-ext-install sockets curl opcache pdo pdo_mysql + && docker-php-ext-enable imagick yaml \ + && docker-php-ext-install sockets opcache pdo_mysql \ + && apk del make automake autoconf gcc g++ curl-dev imagemagick imagemagick-libs imagemagick-dev yaml-dev WORKDIR /usr/src/code diff --git a/bin/doctor b/bin/doctor index 0fe5965da9..022a4d8a5e 100755 --- a/bin/doctor +++ b/bin/doctor @@ -1,3 +1,3 @@ -#!/bin/bash +#!/bin/sh php /usr/src/code/app/tasks/init.php doctor \ No newline at end of file diff --git a/bin/migrate b/bin/migrate index e6de4a1930..509512faea 100755 --- a/bin/migrate +++ b/bin/migrate @@ -1,3 +1,3 @@ -#!/bin/bash +#!/bin/sh php /usr/src/code/app/tasks/migrate.php run \ No newline at end of file diff --git a/bin/schedule b/bin/schedule index a9b05916f7..74da3fe1e0 100644 --- a/bin/schedule +++ b/bin/schedule @@ -1,3 +1,3 @@ -#!/bin/bash +#!/bin/sh REDIS_BACKEND="${_APP_REDIS_HOST}:${_APP_REDIS_PORT}" RESQUE_PHP='/usr/src/code/vendor/autoload.php' php /usr/src/code/vendor/bin/resque-scheduler \ No newline at end of file diff --git a/bin/start b/bin/start index bde1101b48..7dd4ecddce 100755 --- a/bin/start +++ b/bin/start @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh export PHP_VERSION=$PHP_VERSION diff --git a/bin/test b/bin/test index 1f0296c9a1..61f606b156 100755 --- a/bin/test +++ b/bin/test @@ -1,3 +1,3 @@ -#!/bin/bash +#!/bin/sh /usr/src/code/vendor/bin/phpunit --configuration /usr/src/code/phpunit.xml \ No newline at end of file diff --git a/bin/worker-audits b/bin/worker-audits index 3befdbc04f..99b3eac2e7 100644 --- a/bin/worker-audits +++ b/bin/worker-audits @@ -1,3 +1,3 @@ -#!/bin/bash +#!/bin/sh QUEUE='v1-audits' APP_INCLUDE='/usr/src/code/app/workers/audits.php' REDIS_BACKEND="${_APP_REDIS_HOST}:${_APP_REDIS_PORT}" php /usr/src/code/vendor/bin/resque -dopcache.preload=opcache.preload=/usr/src/code/app/preload.php \ No newline at end of file diff --git a/bin/worker-certificates b/bin/worker-certificates index f2a1bde949..6d360aff35 100644 --- a/bin/worker-certificates +++ b/bin/worker-certificates @@ -1,3 +1,3 @@ -#!/bin/bash +#!/bin/sh QUEUE='v1-certificates' APP_INCLUDE='/usr/src/code/app/workers/certificates.php' REDIS_BACKEND="${_APP_REDIS_HOST}:${_APP_REDIS_PORT}" php /usr/src/code/vendor/bin/resque -dopcache.preload=opcache.preload=/usr/src/code/app/preload.php \ No newline at end of file diff --git a/bin/worker-deletes b/bin/worker-deletes index 6c623bfd49..d053381db7 100644 --- a/bin/worker-deletes +++ b/bin/worker-deletes @@ -1,3 +1,3 @@ -#!/bin/bash +#!/bin/sh QUEUE='v1-deletes' APP_INCLUDE='/usr/src/code/app/workers/deletes.php' REDIS_BACKEND="${_APP_REDIS_HOST}:${_APP_REDIS_PORT}" php /usr/src/code/vendor/bin/resque -dopcache.preload=opcache.preload=/usr/src/code/app/preload.php \ No newline at end of file diff --git a/bin/worker-functions b/bin/worker-functions index 55290c992b..787addab0a 100644 --- a/bin/worker-functions +++ b/bin/worker-functions @@ -1,3 +1,3 @@ -#!/bin/bash +#!/bin/sh QUEUE='v1-functions' APP_INCLUDE='/usr/src/code/app/workers/functions.php' REDIS_BACKEND="${_APP_REDIS_HOST}:${_APP_REDIS_PORT}" php /usr/src/code/vendor/bin/resque -dopcache.preload=opcache.preload=/usr/src/code/app/preload.php \ No newline at end of file diff --git a/bin/worker-mails b/bin/worker-mails index 7c6ae5f913..8a1a9de977 100644 --- a/bin/worker-mails +++ b/bin/worker-mails @@ -1,3 +1,3 @@ -#!/bin/bash +#!/bin/sh QUEUE='v1-mails' APP_INCLUDE='/usr/src/code/app/workers/mails.php' REDIS_BACKEND="${_APP_REDIS_HOST}:${_APP_REDIS_PORT}" php /usr/src/code/vendor/bin/resque -dopcache.preload=opcache.preload=/usr/src/code/app/preload.php \ No newline at end of file diff --git a/bin/worker-tasks b/bin/worker-tasks index 1474dd2865..236b34cb75 100644 --- a/bin/worker-tasks +++ b/bin/worker-tasks @@ -1,3 +1,3 @@ -#!/bin/bash +#!/bin/sh QUEUE='v1-tasks' APP_INCLUDE='/usr/src/code/app/workers/tasks.php' REDIS_BACKEND="${_APP_REDIS_HOST}:${_APP_REDIS_PORT}" php /usr/src/code/vendor/bin/resque -dopcache.preload=opcache.preload=/usr/src/code/app/preload.php \ No newline at end of file diff --git a/bin/worker-usage b/bin/worker-usage index c570eeed7b..2b967f8f08 100644 --- a/bin/worker-usage +++ b/bin/worker-usage @@ -1,3 +1,3 @@ -#!/bin/bash +#!/bin/sh QUEUE='v1-usage' APP_INCLUDE='/usr/src/code/app/workers/usage.php' REDIS_BACKEND="${_APP_REDIS_HOST}:${_APP_REDIS_PORT}" php /usr/src/code/vendor/bin/resque -dopcache.preload=opcache.preload=/usr/src/code/app/preload.php \ No newline at end of file diff --git a/bin/worker-webhooks b/bin/worker-webhooks index 9686961a92..d09a4a39ac 100644 --- a/bin/worker-webhooks +++ b/bin/worker-webhooks @@ -1,3 +1,3 @@ -#!/bin/bash +#!/bin/sh QUEUE='v1-webhooks' APP_INCLUDE='/usr/src/code/app/workers/webhooks.php' REDIS_BACKEND="${_APP_REDIS_HOST}:${_APP_REDIS_PORT}" php /usr/src/code/vendor/bin/resque -dopcache.preload=opcache.preload=/usr/src/code/app/preload.php \ No newline at end of file From bfa13a3adf94eec72d8a9a8e96964dfb94515c7f Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Tue, 21 Jul 2020 01:59:44 +0300 Subject: [PATCH 06/10] Fixed Brotli + optimizations --- Dockerfile | 64 ++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 43 insertions(+), 21 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9db9da03f6..69e6af4adc 100755 --- a/Dockerfile +++ b/Dockerfile @@ -31,7 +31,7 @@ RUN \ wget \ git \ zlib-dev \ - brotli + brotli-dev RUN docker-php-ext-install sockets @@ -95,28 +95,50 @@ ENV TZ=Asia/Tel_Aviv \ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone +# RUN apk update +# RUN apk add --no-cache --virtual .deps make +# RUN apk add --no-cache --virtual .deps automake +# RUN apk add --no-cache --virtual .deps autoconf +# RUN apk add --no-cache --virtual .deps gcc +# RUN apk add --no-cache --virtual .deps g++ +# RUN apk add --no-cache --virtual .deps curl-dev +# RUN apk add --no-cache --virtual .deps imagemagick +# RUN apk add --no-cache --virtual .deps imagemagick-libs +# RUN apk add --no-cache --virtual .deps imagemagick-dev +# RUN apk add --no-cache --virtual .deps yaml-dev +# RUN apk add --no-cache certbot +# RUN apk add --no-cache docker + +# RUN pecl install imagick yaml +# RUN docker-php-ext-enable imagick yaml +# RUN docker-php-ext-install sockets opcache pdo_mysql +# RUN apk del make automake autoconf gcc g++ curl-dev imagemagick imagemagick-libs imagemagick-dev yaml-dev + RUN \ - apk update && apk add --no-cache --virtual .deps \ + apk update \ + && apk add --no-cache --virtual .deps \ make \ automake \ autoconf \ gcc \ g++ \ - certbot \ + curl-dev \ # libwebp \ # htop \ # procps \ - docker \ # oniguruma-dev \ - curl-dev \ - imagemagick \ - imagemagick-libs \ - imagemagick-dev \ + && apk add --no-cache \ + libstdc++ \ yaml-dev \ + imagemagick \ + # imagemagick-libs \ + imagemagick-dev \ + certbot \ + docker-cli \ && pecl install imagick yaml \ && docker-php-ext-enable imagick yaml \ && docker-php-ext-install sockets opcache pdo_mysql \ - && apk del make automake autoconf gcc g++ curl-dev imagemagick imagemagick-libs imagemagick-dev yaml-dev + && apk del .deps WORKDIR /usr/src/code @@ -146,18 +168,18 @@ RUN mkdir -p /storage/uploads && \ chown -Rf www-data.www-data /storage/debug && chmod -Rf 0755 /storage/debug # Executables -RUN chmod +x /usr/local/bin/doctor -RUN chmod +x /usr/local/bin/migrate -RUN chmod +x /usr/local/bin/schedule -RUN chmod +x /usr/local/bin/test -RUN chmod +x /usr/local/bin/worker-audits -RUN chmod +x /usr/local/bin/worker-certificates -RUN chmod +x /usr/local/bin/worker-deletes -RUN chmod +x /usr/local/bin/worker-functions -RUN chmod +x /usr/local/bin/worker-mails -RUN chmod +x /usr/local/bin/worker-tasks -RUN chmod +x /usr/local/bin/worker-usage -RUN chmod +x /usr/local/bin/worker-webhooks +RUN chmod +x /usr/local/bin/doctor && \ + chmod +x /usr/local/bin/migrate && \ + chmod +x /usr/local/bin/schedule && \ + chmod +x /usr/local/bin/test && \ + chmod +x /usr/local/bin/worker-audits && \ + chmod +x /usr/local/bin/worker-certificates && \ + 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-tasks && \ + chmod +x /usr/local/bin/worker-usage && \ + chmod +x /usr/local/bin/worker-webhooks # Letsencrypt Permissions RUN mkdir -p /etc/letsencrypt/live/ && chmod -Rf 755 /etc/letsencrypt/live/ From 9219c8ee0073f90fdfa6c95142dc6dde199148f4 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Tue, 21 Jul 2020 08:47:32 +0300 Subject: [PATCH 07/10] Added connection limit --- app/init.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/init.php b/app/init.php index d4a3dce8fa..b9918574bc 100644 --- a/app/init.php +++ b/app/init.php @@ -164,7 +164,7 @@ $register->set('statsd', function () { // Register DB connection }); $register->set('cache', function () { // Register cache connection $redis = new Redis(); - $redis->pconnect(App::getEnv('_APP_REDIS_HOST', ''), + $redis->pconnect(App::getEnv('_APP_REDIS_HOST', '', 2.5), App::getEnv('_APP_REDIS_PORT', '')); return $redis; From 6f83c3b5e367694f7b08c6961ca18d088d9e72f1 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Tue, 21 Jul 2020 08:48:31 +0300 Subject: [PATCH 08/10] Fixed missing protocol --- app/app.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/app.php b/app/app.php index 4b48929ce6..90a2580e87 100644 --- a/app/app.php +++ b/app/app.php @@ -60,7 +60,7 @@ App::init(function ($utopia, $request, $response, $console, $project, $user, $lo $protocol = \parse_url($request->getOrigin($referrer), PHP_URL_SCHEME); $port = \parse_url($request->getOrigin($referrer), PHP_URL_PORT); - $refDomain = $protocol.'://'.((\in_array($origin, $clients)) + $refDomain = (!empty($protocol) ? $protocol : $request->getProtocol()).'://'.((\in_array($origin, $clients)) ? $origin : 'localhost') . (!empty($port) ? ':'.$port : ''); $selfDomain = new Domain($request->getHostname()); From d21036acb78f2881f0a36fb400f9705376d7482c Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Tue, 21 Jul 2020 09:02:45 +0300 Subject: [PATCH 09/10] Image cleanup --- Dockerfile | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/Dockerfile b/Dockerfile index 69e6af4adc..4fcb83b510 100755 --- a/Dockerfile +++ b/Dockerfile @@ -15,7 +15,6 @@ RUN composer update --ignore-platform-reqs --optimize-autoloader \ FROM php:7.4-cli-alpine as step1 ENV TZ=Asia/Tel_Aviv \ - DEBIAN_FRONTEND=noninteractive \ PHP_REDIS_VERSION=5.3.0 \ PHP_SWOOLE_VERSION=4.5.2 \ PHP_XDEBUG_VERSION=sdebug_2_9-beta @@ -60,7 +59,6 @@ LABEL maintainer="team@appwrite.io" ARG VERSION=dev ENV TZ=Asia/Tel_Aviv \ - DEBIAN_FRONTEND=noninteractive \ _APP_SERVER=swoole \ _APP_ENV=production \ _APP_DOMAIN=localhost \ @@ -95,25 +93,6 @@ ENV TZ=Asia/Tel_Aviv \ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone -# RUN apk update -# RUN apk add --no-cache --virtual .deps make -# RUN apk add --no-cache --virtual .deps automake -# RUN apk add --no-cache --virtual .deps autoconf -# RUN apk add --no-cache --virtual .deps gcc -# RUN apk add --no-cache --virtual .deps g++ -# RUN apk add --no-cache --virtual .deps curl-dev -# RUN apk add --no-cache --virtual .deps imagemagick -# RUN apk add --no-cache --virtual .deps imagemagick-libs -# RUN apk add --no-cache --virtual .deps imagemagick-dev -# RUN apk add --no-cache --virtual .deps yaml-dev -# RUN apk add --no-cache certbot -# RUN apk add --no-cache docker - -# RUN pecl install imagick yaml -# RUN docker-php-ext-enable imagick yaml -# RUN docker-php-ext-install sockets opcache pdo_mysql -# RUN apk del make automake autoconf gcc g++ curl-dev imagemagick imagemagick-libs imagemagick-dev yaml-dev - RUN \ apk update \ && apk add --no-cache --virtual .deps \ @@ -123,15 +102,10 @@ RUN \ gcc \ g++ \ curl-dev \ - # libwebp \ - # htop \ - # procps \ - # oniguruma-dev \ && apk add --no-cache \ libstdc++ \ yaml-dev \ imagemagick \ - # imagemagick-libs \ imagemagick-dev \ certbot \ docker-cli \ From 7df08d320bc99a07f9a3c246f623ef742ba18d46 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Tue, 21 Jul 2020 09:03:40 +0300 Subject: [PATCH 10/10] Added debian version --- Dockerfile.swoole => Dockerfile.debian | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) rename Dockerfile.swoole => Dockerfile.debian (98%) diff --git a/Dockerfile.swoole b/Dockerfile.debian similarity index 98% rename from Dockerfile.swoole rename to Dockerfile.debian index a2573e0fc0..0d55f0a6f5 100755 --- a/Dockerfile.swoole +++ b/Dockerfile.debian @@ -92,6 +92,8 @@ ENV TZ=Asia/Tel_Aviv \ _APP_STATSD_PORT=8125 \ _APP_SMTP_HOST=smtp \ _APP_SMTP_PORT=25 \ + _APP_FUNCTIONS_TIMEOUT=900 \ + _APP_FUNCTIONS_CONTAINERS=10 \ _APP_SETUP=self-hosted \ _APP_VERSION=$VERSION #ENV _APP_SMTP_SECURE '' @@ -175,4 +177,4 @@ EXPOSE 80 #, "-dxdebug.profiler_enable=1" #, "-dopcache.preload=opcache.preload=/usr/src/code/app/preload.php" -CMD [ "php", "app/server.php", "-dopcache.preload=opcache.preload=/usr/src/code/app/preload.php" ] +CMD [ "php", "app/server.php", "-dopcache.preload=opcache.preload=/usr/src/code/app/preload.php" ] \ No newline at end of file