diff --git a/Dockerfile.alpine b/Dockerfile.alpine deleted file mode 100755 index d5d4874f15..0000000000 --- a/Dockerfile.alpine +++ /dev/null @@ -1,178 +0,0 @@ -FROM composer:2.0 as step0 - -ARG TESTING=false -ENV TESTING=$TESTING - -WORKDIR /usr/local/src/ - -COPY composer.lock /usr/local/src/ -COPY composer.json /usr/local/src/ - -RUN composer update --ignore-platform-reqs --optimize-autoloader \ - --no-plugins --no-scripts --prefer-dist \ - `if [ "$TESTING" != "true" ]; then echo "--no-dev"; fi` - -FROM php:8.0.0alpha1-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 - -RUN \ - apk update && \ - apk add ca-certificates gcc make g++ autoconf wget git openssl make zip unzip brotli zlib - -RUN docker-php-ext-install sockets - -RUN \ - # Redis Extension - wget -q https://github.com/phpredis/phpredis/archive/$PHP_REDIS_VERSION.tar.gz && \ - tar -xf $PHP_REDIS_VERSION.tar.gz && \ - cd phpredis-$PHP_REDIS_VERSION && \ - phpize && \ - ./configure && \ - make && make install && \ - cd .. && \ - ## Swoole Extension - git clone https://github.com/swoole/swoole-src.git && \ - cd swoole-src && \ - #git checkout v$PHP_SWOOLE_VERSION && \ - phpize && \ - ./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:8.0.0alpha1-cli-alpine as final - -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 \ - _APP_DOMAIN_TARGET=localhost \ - _APP_HOME=https://appwrite.io \ - _APP_EDITION=community \ - _APP_OPTIONS_ABUSE=enabled \ - _APP_OPTIONS_FORCE_HTTPS=disabled \ - _APP_OPENSSL_KEY_V1=your-secret-key \ - _APP_STORAGE_LIMIT=10000000 \ - _APP_STORAGE_ANTIVIRUS=enabled \ - _APP_REDIS_HOST=redis \ - _APP_REDIS_PORT=6379 \ - _APP_DB_HOST=mariadb \ - _APP_DB_PORT=3306 \ - _APP_DB_USER=root \ - _APP_DB_PASS=password \ - _APP_DB_SCHEMA=appwrite \ - _APP_INFLUXDB_HOST=influxdb \ - _APP_INFLUXDB_PORT=8086 \ - _APP_STATSD_HOST=telegraf \ - _APP_STATSD_PORT=8125 \ - _APP_SMTP_HOST=smtp \ - _APP_SMTP_PORT=25 \ - _APP_SETUP=self-hosted \ - _APP_VERSION=$VERSION -#ENV _APP_SMTP_SECURE '' -#ENV _APP_SMTP_USERNAME '' -#ENV _APP_SMTP_PASSWORD '' - -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - -RUN \ - apk update && \ - apk add libwebp certbot htop procps \ - oniguruma libcurl imagemagick-libs yaml-dev brotli-libs zlib-dev - # pecl install imagick yaml && \ - # docker-php-ext-enable imagick yaml - -RUN docker-php-ext-install sockets curl opcache pdo pdo_mysql - -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-20190128/swoole.so /usr/local/lib/php/extensions/no-debug-non-zts-20190128/ -COPY --from=step1 /usr/local/lib/php/extensions/no-debug-non-zts-20190128/redis.so /usr/local/lib/php/extensions/no-debug-non-zts-20190128/ -# COPY --from=step1 /usr/local/lib/php/extensions/no-debug-non-zts-20190128/xdebug.so /usr/local/lib/php/extensions/no-debug-non-zts-20190128/ -# COPY --from=step1 /usr/local/lib/php/extensions/no-debug-non-zts-20190128/meminfo.so /usr/local/lib/php/extensions/no-debug-non-zts-20190128/ - -# Add Source Code -COPY ./app /usr/src/code/app -COPY ./bin /usr/local/bin -COPY ./docs /usr/src/code/docs -COPY ./public /usr/src/code/public -COPY ./src /usr/src/code/src - -# Set Volumes -RUN mkdir -p /storage/uploads && \ - mkdir -p /storage/cache && \ - mkdir -p /storage/config && \ - mkdir -p /storage/certificates && \ - mkdir -p /storage/functions && \ - mkdir -p /storage/debug && \ - chown -Rf www-data.www-data /storage/uploads && chmod -Rf 0755 /storage/uploads && \ - chown -Rf www-data.www-data /storage/cache && chmod -Rf 0755 /storage/cache && \ - chown -Rf www-data.www-data /storage/config && chmod -Rf 0755 /storage/config && \ - chown -Rf www-data.www-data /storage/certificates && chmod -Rf 0755 /storage/certificates && \ - chown -Rf www-data.www-data /storage/functions && chmod -Rf 0755 /storage/functions && \ - 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 - -# Letsencrypt Permissions -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" ] \ No newline at end of file diff --git a/Dockerfile.debian b/Dockerfile.debian deleted file mode 100755 index 52cc95f827..0000000000 --- a/Dockerfile.debian +++ /dev/null @@ -1,180 +0,0 @@ -FROM composer:2.0 as step0 - -ARG TESTING=false -ENV TESTING=$TESTING - -WORKDIR /usr/local/src/ - -COPY composer.lock /usr/local/src/ -COPY composer.json /usr/local/src/ - -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 - -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 - -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 - -RUN docker-php-ext-install sockets - -RUN \ - # Redis Extension - wget -q https://github.com/phpredis/phpredis/archive/$PHP_REDIS_VERSION.tar.gz && \ - tar -xf $PHP_REDIS_VERSION.tar.gz && \ - cd phpredis-$PHP_REDIS_VERSION && \ - phpize && \ - ./configure && \ - make && make install && \ - cd .. && \ - ## Swoole Extension - git clone https://github.com/swoole/swoole-src.git && \ - cd swoole-src && \ - git checkout v$PHP_SWOOLE_VERSION && \ - phpize && \ - ./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 - -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 \ - _APP_DOMAIN_TARGET=localhost \ - _APP_HOME=https://appwrite.io \ - _APP_EDITION=community \ - _APP_OPTIONS_ABUSE=enabled \ - _APP_OPTIONS_FORCE_HTTPS=disabled \ - _APP_OPENSSL_KEY_V1=your-secret-key \ - _APP_STORAGE_LIMIT=10000000 \ - _APP_STORAGE_ANTIVIRUS=enabled \ - _APP_REDIS_HOST=redis \ - _APP_REDIS_PORT=6379 \ - _APP_DB_HOST=mariadb \ - _APP_DB_PORT=3306 \ - _APP_DB_USER=root \ - _APP_DB_PASS=password \ - _APP_DB_SCHEMA=appwrite \ - _APP_INFLUXDB_HOST=influxdb \ - _APP_INFLUXDB_PORT=8086 \ - _APP_STATSD_HOST=telegraf \ - _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 '' -#ENV _APP_SMTP_USERNAME '' -#ENV _APP_SMTP_PASSWORD '' - -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 - -RUN docker-php-ext-install sockets curl opcache pdo pdo_mysql - -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 -COPY ./bin /usr/local/bin -COPY ./docs /usr/src/code/docs -COPY ./public /usr/src/code/public -COPY ./src /usr/src/code/src - -# Set Volumes -RUN mkdir -p /storage/uploads && \ - mkdir -p /storage/cache && \ - mkdir -p /storage/config && \ - mkdir -p /storage/certificates && \ - mkdir -p /storage/functions && \ - mkdir -p /storage/debug && \ - chown -Rf www-data.www-data /storage/uploads && chmod -Rf 0755 /storage/uploads && \ - chown -Rf www-data.www-data /storage/cache && chmod -Rf 0755 /storage/cache && \ - chown -Rf www-data.www-data /storage/config && chmod -Rf 0755 /storage/config && \ - chown -Rf www-data.www-data /storage/certificates && chmod -Rf 0755 /storage/certificates && \ - chown -Rf www-data.www-data /storage/functions && chmod -Rf 0755 /storage/functions && \ - 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 - -# Letsencrypt Permissions -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" ] \ No newline at end of file diff --git a/Dockerfile.php8 b/Dockerfile.php8 deleted file mode 100755 index 570942a463..0000000000 --- a/Dockerfile.php8 +++ /dev/null @@ -1,173 +0,0 @@ -FROM composer:2.0 as step0 - -ARG TESTING=false -ENV TESTING=$TESTING - -WORKDIR /usr/local/src/ - -COPY composer.lock /usr/local/src/ -COPY composer.json /usr/local/src/ - -RUN composer update --ignore-platform-reqs --optimize-autoloader \ - --no-plugins --no-scripts --prefer-dist \ - `if [ "$TESTING" != "true" ]; then echo "--no-dev"; fi` - -FROM php:8.0.0alpha3-cli-alpine as step1 - -ENV TZ=Asia/Tel_Aviv \ - PHP_REDIS_VERSION=5.3.1 \ - PHP_SWOOLE_VERSION=4.5.2 \ - PHP_XDEBUG_VERSION=sdebug_2_9-beta - -RUN \ - apk add --no-cache --virtual .deps \ - make \ - automake \ - autoconf \ - gcc \ - g++ \ - tar \ - wget \ - git \ - zlib-dev \ - brotli-dev - -RUN docker-php-ext-install sockets - -RUN \ - # Redis Extension - wget -q https://github.com/phpredis/phpredis/archive/$PHP_REDIS_VERSION.tar.gz && \ - tar -xf $PHP_REDIS_VERSION.tar.gz && \ - cd phpredis-$PHP_REDIS_VERSION && \ - phpize && \ - ./configure && \ - make && make install && \ - cd .. && \ - ## Swoole Extension - git clone https://github.com/swoole/swoole-src.git && \ - cd swoole-src && \ - git checkout v$PHP_SWOOLE_VERSION && \ - phpize && \ - ./configure --enable-sockets --enable-http2 && \ - make && make install && \ - cd .. - -FROM php:8.0.0alpha3-cli-alpine as final - -LABEL maintainer="team@appwrite.io" - -ARG VERSION=dev - -ENV TZ=Asia/Tel_Aviv \ - _APP_SERVER=swoole \ - _APP_ENV=production \ - _APP_DOMAIN=localhost \ - _APP_DOMAIN_TARGET=localhost \ - _APP_HOME=https://appwrite.io \ - _APP_EDITION=community \ - _APP_OPTIONS_ABUSE=enabled \ - _APP_OPTIONS_FORCE_HTTPS=disabled \ - _APP_OPENSSL_KEY_V1=your-secret-key \ - _APP_STORAGE_LIMIT=10000000 \ - _APP_STORAGE_ANTIVIRUS=enabled \ - _APP_REDIS_HOST=redis \ - _APP_REDIS_PORT=6379 \ - _APP_DB_HOST=mariadb \ - _APP_DB_PORT=3306 \ - _APP_DB_USER=root \ - _APP_DB_PASS=password \ - _APP_DB_SCHEMA=appwrite \ - _APP_INFLUXDB_HOST=influxdb \ - _APP_INFLUXDB_PORT=8086 \ - _APP_STATSD_HOST=telegraf \ - _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 '' -#ENV _APP_SMTP_USERNAME '' -#ENV _APP_SMTP_PASSWORD '' - -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - -RUN \ - apk update \ - && apk add --no-cache --virtual .deps \ - make \ - automake \ - autoconf \ - gcc \ - g++ \ - curl-dev \ - && apk add --no-cache \ - libstdc++ \ - yaml-dev \ - imagemagick \ - 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 .deps - -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/ - -# Add Source Code -COPY ./app /usr/src/code/app -COPY ./bin /usr/local/bin -COPY ./docs /usr/src/code/docs -COPY ./public /usr/src/code/public -COPY ./src /usr/src/code/src - -# Set Volumes -RUN mkdir -p /storage/uploads && \ - mkdir -p /storage/cache && \ - mkdir -p /storage/config && \ - mkdir -p /storage/certificates && \ - mkdir -p /storage/functions && \ - mkdir -p /storage/debug && \ - chown -Rf www-data.www-data /storage/uploads && chmod -Rf 0755 /storage/uploads && \ - chown -Rf www-data.www-data /storage/cache && chmod -Rf 0755 /storage/cache && \ - chown -Rf www-data.www-data /storage/config && chmod -Rf 0755 /storage/config && \ - chown -Rf www-data.www-data /storage/certificates && chmod -Rf 0755 /storage/certificates && \ - chown -Rf www-data.www-data /storage/functions && chmod -Rf 0755 /storage/functions && \ - chown -Rf www-data.www-data /storage/debug && chmod -Rf 0755 /storage/debug - -# Executables -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/ - -# 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 "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 "opcache.jit_buffer_size=100M" >> /usr/local/etc/php/conf.d/appwrite.ini -RUN echo "opcache.jit=1235" >> /usr/local/etc/php/conf.d/appwrite.ini - -EXPOSE 80 - -CMD [ "php", "app/server.php", "-dopcache.preload=opcache.preload=/usr/src/code/app/preload.php" ] diff --git a/docker-compose.swoole.yml b/docker-compose.swoole.yml deleted file mode 100644 index 1fdd92f627..0000000000 --- a/docker-compose.swoole.yml +++ /dev/null @@ -1,398 +0,0 @@ -version: '3' - -services: - traefik: - image: traefik:2.2 - container_name: appwrite-traefik - command: - - --log.level=DEBUG - - --api.insecure=true - - --providers.file.directory=/storage/config - - --providers.file.watch=true - - --providers.docker=true - - --entrypoints.web.address=:80 - - --entrypoints.websecure.address=:443 - - --accesslog=true - restart: unless-stopped - ports: - - 80:80 - - 443:443 - - 8080:8080 - volumes: - - /var/run/docker.sock:/var/run/docker.sock - - appwrite-config:/storage/config:ro - - appwrite-certificates:/storage/certificates:ro - depends_on: - - appwrite - networks: - - gateway - - appwrite - - appwrite: - container_name: appwrite - build: - context: . - args: - - TESTING=true - - VERSION=dev - restart: unless-stopped - ports: - - 9501:80 - networks: - - appwrite - labels: - - traefik.http.routers.appwrite.rule=PathPrefix(`/`) - - traefik.http.routers.appwrite-secure.rule=PathPrefix(`/`) - - traefik.http.routers.appwrite-secure.tls=true - volumes: - - /var/run/docker.sock:/var/run/docker.sock - - appwrite-uploads:/storage/uploads:rw - - appwrite-cache:/storage/cache:rw - - appwrite-config:/storage/config:rw - - appwrite-certificates:/storage/certificates:rw - - appwrite-functions:/storage/functions:rw - - ./phpunit.xml:/usr/src/code/phpunit.xml - - ./tests:/usr/src/code/tests - - ./app:/usr/src/code/app - # - ./vendor:/usr/src/code/vendor - - ./docs:/usr/src/code/docs - - ./public:/usr/src/code/public - - ./src:/usr/src/code/src - - ./debug:/tmp - depends_on: - - mariadb - - redis - - clamav - - influxdb - environment: - - _APP_ENV - - _APP_OPTIONS_ABUSE - - _APP_OPTIONS_FORCE_HTTPS - - _APP_OPENSSL_KEY_V1 - - _APP_DOMAIN - - _APP_DOMAIN_TARGET - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_DB_HOST - - _APP_DB_PORT - - _APP_DB_SCHEMA - - _APP_DB_USER - - _APP_DB_PASS - - _APP_INFLUXDB_HOST - - _APP_INFLUXDB_PORT - - appwrite-worker-usage: - entrypoint: worker-usage - container_name: appwrite-worker-usage - build: - context: . - restart: unless-stopped - networks: - - appwrite - depends_on: - - redis - - telegraf - environment: - - _APP_ENV - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_STATSD_HOST - - _APP_STATSD_PORT - - appwrite-worker-audits: - entrypoint: worker-audits - container_name: appwrite-worker-audits - build: - context: . - restart: unless-stopped - networks: - - appwrite - depends_on: - - redis - - mariadb - environment: - - _APP_ENV - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_DB_HOST - - _APP_DB_PORT - - _APP_DB_SCHEMA - - _APP_DB_USER - - _APP_DB_PASS - - appwrite-worker-webhooks: - entrypoint: worker-webhooks - container_name: appwrite-worker-webhooks - build: - context: . - restart: unless-stopped - networks: - - appwrite - depends_on: - - redis - - mariadb - environment: - - _APP_ENV - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_DB_HOST - - _APP_DB_PORT - - _APP_DB_SCHEMA - - _APP_DB_USER - - _APP_DB_PASS - - appwrite-worker-tasks: - entrypoint: worker-tasks - container_name: appwrite-worker-tasks - build: - context: . - restart: unless-stopped - networks: - - appwrite - depends_on: - - redis - - mariadb - environment: - - _APP_ENV - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_DB_HOST - - _APP_DB_PORT - - _APP_DB_SCHEMA - - _APP_DB_USER - - _APP_DB_PASS - - appwrite-worker-deletes: - entrypoint: worker-deletes - container_name: appwrite-worker-deletes - build: - context: . - restart: unless-stopped - networks: - - appwrite - depends_on: - - redis - - mariadb - volumes: - - appwrite-uploads:/storage/uploads:rw - - appwrite-cache:/storage/cache:rw - environment: - - _APP_ENV - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_DB_HOST - - _APP_DB_PORT - - _APP_DB_SCHEMA - - _APP_DB_USER - - _APP_DB_PASS - - appwrite-worker-certificates: - entrypoint: worker-certificates - container_name: appwrite-worker-certificates - build: - context: . - restart: unless-stopped - networks: - - appwrite - depends_on: - - redis - - mariadb - volumes: - - appwrite-config:/storage/config:rw - - appwrite-certificates:/storage/certificates:rw - environment: - - _APP_ENV - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_DB_HOST - - _APP_DB_PORT - - _APP_DB_SCHEMA - - _APP_DB_USER - - _APP_DB_PASS - - appwrite-worker-functions: - entrypoint: worker-functions - container_name: appwrite-worker-functions - build: - context: . - restart: unless-stopped - networks: - - appwrite - depends_on: - - redis - - mariadb - volumes: - - /var/run/docker.sock:/var/run/docker.sock - - appwrite-functions:/storage/functions:rw - environment: - - _APP_ENV - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - appwrite-worker-mails: - entrypoint: worker-mails - container_name: appwrite-worker-mails - build: - context: . - restart: unless-stopped - networks: - - appwrite - depends_on: - - redis - - maildev - # - smtp - environment: - - _APP_ENV - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - _APP_SMTP_HOST - - _APP_SMTP_PORT - - appwrite-schedule: - entrypoint: schedule - container_name: appwrite-schedule - build: - context: . - restart: unless-stopped - networks: - - appwrite - depends_on: - - redis - environment: - - _APP_ENV - - _APP_REDIS_HOST - - _APP_REDIS_PORT - - mariadb: - image: appwrite/mariadb:1.1.0 # fix issues when upgrading using: mysql_upgrade -u root -p - container_name: appwrite-mariadb - restart: unless-stopped - networks: - - appwrite - volumes: - - appwrite-mariadb:/var/lib/mysql:rw - ports: - - "3306:3306" - environment: - - MYSQL_ROOT_PASSWORD=rootsecretpassword - - MYSQL_DATABASE=appwrite - - MYSQL_USER=user - - MYSQL_PASSWORD=password - command: 'mysqld --innodb-flush-method=fsync' - - maildev: - image: djfarrelly/maildev - container_name: appwrite-maildev - restart: unless-stopped - ports: - - '1080:80' - networks: - - appwrite - - # smtp: - # image: appwrite/smtp:1.0.1 - # container_name: appwrite-smtp - # restart: unless-stopped - # networks: - # - appwrite - # environment: - # - MAILNAME=appwrite - # - RELAY_NETWORKS=:192.168.0.0/24:10.0.0.0/16 - - redis: - image: redis:5.0 - container_name: appwrite-redis - restart: unless-stopped - networks: - - appwrite - volumes: - - appwrite-redis:/data:rw - - clamav: - image: appwrite/clamav:1.0.12 - container_name: appwrite-clamav - restart: unless-stopped - networks: - - appwrite - volumes: - - appwrite-uploads:/storage/uploads - - influxdb: - image: influxdb:1.6 - container_name: appwrite-influxdb - restart: unless-stopped - networks: - - appwrite - volumes: - - appwrite-influxdb:/var/lib/influxdb:rw - - telegraf: - image: appwrite/telegraf:1.0.0 - container_name: appwrite-telegraf - restart: unless-stopped - networks: - - appwrite - - # redis-commander: - # image: rediscommander/redis-commander:latest - # restart: unless-stopped - # networks: - # - appwrite - # environment: - # - REDIS_HOSTS=redis - # ports: - # - "8081:8081" - - # resque: - # image: registry.gitlab.com/appwrite/appwrite/resque-web:v1.0.2 - # restart: unless-stopped - # networks: - # - appwrite - # ports: - # - "5678:5678" - # environment: - # - RESQUE_WEB_HOST=redis - # - RESQUE_WEB_PORT=6379 - # - RESQUE_WEB_HTTP_BASIC_AUTH_USER=user - # - RESQUE_WEB_HTTP_BASIC_AUTH_PASSWORD=password - - # chronograf: - # image: chronograf:1.5 - # container_name: appwrite-chronograf - # restart: unless-stopped - # networks: - # - appwrite - # volumes: - # - appwrite-chronograf:/var/lib/chronograf - # ports: - # - "8888:8888" - # environment: - # - INFLUXDB_URL=http://influxdb:8086 - # - KAPACITOR_URL=http://kapacitor:9092 - # - AUTH_DURATION=48h - # - TOKEN_SECRET=duperduper5674829!jwt - # - GH_CLIENT_ID=d86f7145a41eacfc52cc - # - GH_CLIENT_SECRET=9e0081062367a2134e7f2ea95ba1a32d08b6c8ab - # - GH_ORGS=appwrite - - # webgrind: - # image: 'jokkedk/webgrind:latest' - # volumes: - # - './debug:/tmp' - # ports: - # - '3001:80' - -networks: - gateway: - appwrite: - -volumes: - appwrite-mariadb: - appwrite-redis: - appwrite-cache: - appwrite-uploads: - appwrite-certificates: - appwrite-functions: - appwrite-influxdb: - appwrite-chronograf: - appwrite-config: