From c2116922c0f5720acaba2d569da041d7fa3156bd Mon Sep 17 00:00:00 2001 From: Nidhi Gupta Date: Fri, 25 Sep 2020 14:59:39 +0530 Subject: [PATCH 01/12] Update add-oauth2-provider.md --- docs/tutorials/add-oauth2-provider.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorials/add-oauth2-provider.md b/docs/tutorials/add-oauth2-provider.md index b7c71b742b..3996990203 100644 --- a/docs/tutorials/add-oauth2-provider.md +++ b/docs/tutorials/add-oauth2-provider.md @@ -1,6 +1,6 @@ # Adding a New OAuth2 Provider -This document is part of the Appwrite contributors' guide. Before you continue reading this document make sure you have read the [Code of Conduct](../CODE_OF_CONDUCT.md) and the [Contributing Guide](../CONTRIBUTING.md). +This document is part of the Appwrite contributors' guide. Before you continue reading this document make sure you have read the [Code of Conduct](./CODE_OF_CONDUCT.md) and the [Contributing Guide](./CONTRIBUTING.md). ## Getting Started From 15089d91fa4430975cc89fe7c7a0efab58d21742 Mon Sep 17 00:00:00 2001 From: Nidhi Gupta Date: Fri, 25 Sep 2020 15:01:43 +0530 Subject: [PATCH 02/12] Update add-oauth2-provider.md --- docs/tutorials/add-oauth2-provider.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorials/add-oauth2-provider.md b/docs/tutorials/add-oauth2-provider.md index 3996990203..5e1c07dabc 100644 --- a/docs/tutorials/add-oauth2-provider.md +++ b/docs/tutorials/add-oauth2-provider.md @@ -1,6 +1,6 @@ # Adding a New OAuth2 Provider -This document is part of the Appwrite contributors' guide. Before you continue reading this document make sure you have read the [Code of Conduct](./CODE_OF_CONDUCT.md) and the [Contributing Guide](./CONTRIBUTING.md). +This document is part of the Appwrite contributors' guide. Before you continue reading this document make sure you have read the [Code of Conduct](https://github.com/appwrite/appwrite/blob/master/CODE_OF_CONDUCT.md) and the [Contributing Guide](https://github.com/appwrite/appwrite/blob/master/CONTRIBUTING.md). ## Getting Started From 5c0d369db55716b871009c684c4e961320fe943a Mon Sep 17 00:00:00 2001 From: Nidhi Gupta Date: Fri, 25 Sep 2020 15:03:41 +0530 Subject: [PATCH 03/12] Update add-oauth2-provider.md --- docs/tutorials/add-oauth2-provider.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorials/add-oauth2-provider.md b/docs/tutorials/add-oauth2-provider.md index 5e1c07dabc..9fb198b5c1 100644 --- a/docs/tutorials/add-oauth2-provider.md +++ b/docs/tutorials/add-oauth2-provider.md @@ -1,6 +1,6 @@ # Adding a New OAuth2 Provider -This document is part of the Appwrite contributors' guide. Before you continue reading this document make sure you have read the [Code of Conduct](https://github.com/appwrite/appwrite/blob/master/CODE_OF_CONDUCT.md) and the [Contributing Guide](https://github.com/appwrite/appwrite/blob/master/CONTRIBUTING.md). +This document is part of the Appwrite contributors' guide. Before you continue reading this document make sure you have read the [Code of Conduct](master/CODE_OF_CONDUCT.md) and the [Contributing Guide](master/CONTRIBUTING.md). ## Getting Started From 8e65583abcad0816d5b4ea5f360754e4a24b235e Mon Sep 17 00:00:00 2001 From: Nidhi Gupta Date: Fri, 25 Sep 2020 15:05:12 +0530 Subject: [PATCH 04/12] Update add-oauth2-provider.md --- docs/tutorials/add-oauth2-provider.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorials/add-oauth2-provider.md b/docs/tutorials/add-oauth2-provider.md index 9fb198b5c1..c9bee9986a 100644 --- a/docs/tutorials/add-oauth2-provider.md +++ b/docs/tutorials/add-oauth2-provider.md @@ -1,6 +1,6 @@ # Adding a New OAuth2 Provider -This document is part of the Appwrite contributors' guide. Before you continue reading this document make sure you have read the [Code of Conduct](master/CODE_OF_CONDUCT.md) and the [Contributing Guide](master/CONTRIBUTING.md). +This document is part of the Appwrite contributors' guide. Before you continue reading this document make sure you have read the [Code of Conduct](CODE_OF_CONDUCT.md) and the [Contributing Guide](CONTRIBUTING.md). ## Getting Started From 3da23c604dcb30b454107154fe74a0a125588f6b Mon Sep 17 00:00:00 2001 From: Nidhi Gupta Date: Fri, 25 Sep 2020 15:19:16 +0530 Subject: [PATCH 05/12] Update add-oauth2-provider.md Added the right path for CODE OF CONDUCT and CONTRIBUTING hyperlinks --- docs/tutorials/add-oauth2-provider.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorials/add-oauth2-provider.md b/docs/tutorials/add-oauth2-provider.md index b7c71b742b..5e1c07dabc 100644 --- a/docs/tutorials/add-oauth2-provider.md +++ b/docs/tutorials/add-oauth2-provider.md @@ -1,6 +1,6 @@ # Adding a New OAuth2 Provider -This document is part of the Appwrite contributors' guide. Before you continue reading this document make sure you have read the [Code of Conduct](../CODE_OF_CONDUCT.md) and the [Contributing Guide](../CONTRIBUTING.md). +This document is part of the Appwrite contributors' guide. Before you continue reading this document make sure you have read the [Code of Conduct](https://github.com/appwrite/appwrite/blob/master/CODE_OF_CONDUCT.md) and the [Contributing Guide](https://github.com/appwrite/appwrite/blob/master/CONTRIBUTING.md). ## Getting Started From 6a7f0b9c8fd81a70cf18f35043b6c0eb5c677022 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sun, 27 Sep 2020 17:29:06 +0300 Subject: [PATCH 06/12] Added missing env vars --- .env | 5 +++- app/views/install/compose.phtml | 8 ++++++ app/workers/certificates.php | 2 +- docker-compose.yml | 45 ++++++++++++++++++++------------- 4 files changed, 41 insertions(+), 19 deletions(-) diff --git a/.env b/.env index f8777509a3..f1346302ee 100644 --- a/.env +++ b/.env @@ -1,5 +1,8 @@ _APP_ENV=production _APP_ENV=development +_APP_SYSTEM_EMAIL_NAME=Appwrite +_APP_SYSTEM_EMAIL_ADDRESS=team@appwrite.io +_APP_SYSTEM_SECURITY_EMAIL_ADDRESS=security@appwrite.io _APP_OPTIONS_ABUSE=disabled _APP_OPTIONS_FORCE_HTTPS=disabled _APP_OPENSSL_KEY_V1=your-secret-key @@ -16,7 +19,7 @@ _APP_INFLUXDB_HOST=influxdb _APP_INFLUXDB_PORT=8086 _APP_STATSD_HOST=telegraf _APP_STATSD_PORT=8125 -_APP_SMTP_HOST=maildev +_APP_SMTP_HOST=smtp _APP_SMTP_PORT=25 _APP_STORAGE_LIMIT=100000000 _APP_FUNCTIONS_TIMEOUT=900 diff --git a/app/views/install/compose.phtml b/app/views/install/compose.phtml index 7df932c9e2..66583c380a 100644 --- a/app/views/install/compose.phtml +++ b/app/views/install/compose.phtml @@ -52,6 +52,9 @@ services: - influxdb environment: - _APP_ENV + - _APP_SYSTEM_EMAIL_NAME + - _APP_SYSTEM_EMAIL_ADDRESS + - _APP_SYSTEM_SECURITY_EMAIL_ADDRESS - _APP_OPTIONS_ABUSE - _APP_OPTIONS_FORCE_HTTPS - _APP_OPENSSL_KEY_V1 @@ -119,6 +122,7 @@ services: - mariadb environment: - _APP_ENV + - _APP_SYSTEM_SECURITY_EMAIL_ADDRESS - _APP_REDIS_HOST - _APP_REDIS_PORT - _APP_DB_HOST @@ -139,6 +143,7 @@ services: - mariadb environment: - _APP_ENV + - _APP_SYSTEM_SECURITY_EMAIL_ADDRESS - _APP_REDIS_HOST - _APP_REDIS_PORT - _APP_DB_HOST @@ -185,6 +190,7 @@ services: - appwrite-certificates:/storage/certificates:rw environment: - _APP_ENV + - _APP_SYSTEM_SECURITY_EMAIL_ADDRESS - _APP_REDIS_HOST - _APP_REDIS_PORT - _APP_DB_HOST @@ -231,6 +237,8 @@ services: - smtp environment: - _APP_ENV + - _APP_SYSTEM_EMAIL_NAME + - _APP_SYSTEM_EMAIL_ADDRESS - _APP_REDIS_HOST - _APP_REDIS_PORT - _APP_SMTP_HOST diff --git a/app/workers/certificates.php b/app/workers/certificates.php index 4b81a9ea9a..421bd57019 100644 --- a/app/workers/certificates.php +++ b/app/workers/certificates.php @@ -115,7 +115,7 @@ class CertificatesV1 $staging = (App::isProduction()) ? '' : ' --dry-run'; $response = \shell_exec("certbot certonly --webroot --noninteractive --agree-tos{$staging} \ - --email ".App::getEnv('_APP_SYSTEM_EMAIL_ADDRESS', 'security@localhost.test')." \ + --email ".App::getEnv('_APP_SYSTEM_SECURITY_EMAIL_ADDRESS', 'security@localhost.test')." \ -w ".APP_STORAGE_CERTIFICATES." \ -d {$domain->get()}"); diff --git a/docker-compose.yml b/docker-compose.yml index 132fe9f2c2..48020fef5e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -66,6 +66,9 @@ services: - influxdb environment: - _APP_ENV + - _APP_SYSTEM_EMAIL_NAME + - _APP_SYSTEM_EMAIL_ADDRESS + - _APP_SYSTEM_SECURITY_EMAIL_ADDRESS - _APP_OPTIONS_ABUSE - _APP_OPTIONS_FORCE_HTTPS - _APP_OPENSSL_KEY_V1 @@ -136,6 +139,7 @@ services: - mariadb environment: - _APP_ENV + - _APP_SYSTEM_SECURITY_EMAIL_ADDRESS - _APP_REDIS_HOST - _APP_REDIS_PORT - _APP_DB_HOST @@ -157,6 +161,7 @@ services: - mariadb environment: - _APP_ENV + - _APP_SYSTEM_SECURITY_EMAIL_ADDRESS - _APP_REDIS_HOST - _APP_REDIS_PORT - _APP_DB_HOST @@ -205,6 +210,7 @@ services: - appwrite-certificates:/storage/certificates:rw environment: - _APP_ENV + - _APP_SYSTEM_SECURITY_EMAIL_ADDRESS - _APP_REDIS_HOST - _APP_REDIS_PORT - _APP_DB_HOST @@ -250,10 +256,12 @@ services: - appwrite depends_on: - redis - - maildev - # - smtp + # - maildev + - smtp environment: - _APP_ENV + - _APP_SYSTEM_EMAIL_NAME + - _APP_SYSTEM_EMAIL_ADDRESS - _APP_REDIS_HOST - _APP_REDIS_PORT - _APP_SMTP_HOST @@ -290,25 +298,28 @@ services: - MYSQL_USER=user - MYSQL_PASSWORD=password command: 'mysqld --innodb-flush-method=fsync' + # command: mv /var/lib/mysql/ib_logfile1 /var/lib/mysql/ib_logfile1.bu - 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 + # maildev: + # image: djfarrelly/maildev + # container_name: appwrite-maildev # restart: unless-stopped + # ports: + # - '1080:80' # networks: # - appwrite - # environment: - # - MAILNAME=appwrite - # - RELAY_NETWORKS=:192.168.0.0/24:10.0.0.0/16 + + smtp: + image: appwrite/smtp:1.2.0 + container_name: appwrite-smtp + restart: unless-stopped + networks: + - appwrite + environment: + - LOCAL_DOMAINS=@ + - RELAY_FROM_HOSTS=192.168.0.0/16 ; *.yourdomain.com + - SMARTHOST_HOST=smtp + - SMARTHOST_PORT=587 redis: image: redis:5.0 From 47091380412e856203e5aedbbecb690164d321af Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sun, 27 Sep 2020 17:31:29 +0300 Subject: [PATCH 07/12] Updated SMTP server --- .env | 2 +- docker-compose.yml | 38 +++++++++++++++++++------------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.env b/.env index f1346302ee..6583a94fc8 100644 --- a/.env +++ b/.env @@ -19,7 +19,7 @@ _APP_INFLUXDB_HOST=influxdb _APP_INFLUXDB_PORT=8086 _APP_STATSD_HOST=telegraf _APP_STATSD_PORT=8125 -_APP_SMTP_HOST=smtp +_APP_SMTP_HOST=maildev _APP_SMTP_PORT=25 _APP_STORAGE_LIMIT=100000000 _APP_FUNCTIONS_TIMEOUT=900 diff --git a/docker-compose.yml b/docker-compose.yml index 48020fef5e..599bbe380a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -256,8 +256,8 @@ services: - appwrite depends_on: - redis - # - maildev - - smtp + - maildev + # - smtp environment: - _APP_ENV - _APP_SYSTEM_EMAIL_NAME @@ -300,26 +300,26 @@ services: command: 'mysqld --innodb-flush-method=fsync' # command: mv /var/lib/mysql/ib_logfile1 /var/lib/mysql/ib_logfile1.bu - # maildev: - # image: djfarrelly/maildev - # container_name: appwrite-maildev - # restart: unless-stopped - # ports: - # - '1080:80' - # networks: - # - appwrite - - smtp: - image: appwrite/smtp:1.2.0 - container_name: appwrite-smtp + maildev: + image: djfarrelly/maildev + container_name: appwrite-maildev restart: unless-stopped + ports: + - '1080:80' networks: - appwrite - environment: - - LOCAL_DOMAINS=@ - - RELAY_FROM_HOSTS=192.168.0.0/16 ; *.yourdomain.com - - SMARTHOST_HOST=smtp - - SMARTHOST_PORT=587 + + # smtp: + # image: appwrite/smtp:1.2.0 + # container_name: appwrite-smtp + # restart: unless-stopped + # networks: + # - appwrite + # environment: + # - LOCAL_DOMAINS=@ + # - RELAY_FROM_HOSTS=192.168.0.0/16 ; *.yourdomain.com + # - SMARTHOST_HOST=smtp + # - SMARTHOST_PORT=587 redis: image: redis:5.0 From 2baac139e8cae8b320b8620eb048566db8eddc41 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sun, 27 Sep 2020 17:46:04 +0300 Subject: [PATCH 08/12] Updated CI --- .travis.yml | 19 ++++++++----------- docker-compose.yml | 2 +- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 89db541ea3..c909ec4332 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,7 @@ -language: php +arch: + - amd64 -php: - - '7.4' - -addons: - hosts: - - appwrite.test +os: linux notifications: email: @@ -15,10 +11,11 @@ services: - docker before_install: - - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - - - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" - - sudo apt-get update - - sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce + - curl -fsSL https://get.docker.com | sh + - echo '{"experimental":"enabled"}' | sudo tee /etc/docker/daemon.json + - mkdir -p $HOME/.docker + - echo '{"experimental":"enabled"}' | sudo tee $HOME/.docker/config.json + - sudo service docker start # cache: # directories: diff --git a/docker-compose.yml b/docker-compose.yml index 599bbe380a..05e5a36692 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -298,7 +298,7 @@ services: - MYSQL_USER=user - MYSQL_PASSWORD=password command: 'mysqld --innodb-flush-method=fsync' - # command: mv /var/lib/mysql/ib_logfile1 /var/lib/mysql/ib_logfile1.bu + # command: mv /var/lib/mysql/ib_logfile0 /var/lib/mysql/ib_logfile0.bu && mv /var/lib/mysql/ib_logfile1 /var/lib/mysql/ib_logfile1.bu maildev: image: djfarrelly/maildev From 5d2b847e5d8a45992da58d9b04c9b47cb9f21f60 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sun, 27 Sep 2020 17:57:44 +0300 Subject: [PATCH 09/12] Updated Redis + Influxdb to Alpine tags --- app/views/install/compose.phtml | 4 ++-- docker-compose.yml | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/views/install/compose.phtml b/app/views/install/compose.phtml index 66583c380a..e2e9d2276d 100644 --- a/app/views/install/compose.phtml +++ b/app/views/install/compose.phtml @@ -286,7 +286,7 @@ services: - RELAY_NETWORKS=:192.168.0.0/24:10.0.0.0/16 redis: - image: redis:5.0 + image: redis:6.0-alpine3.12 container_name: appwrite-redis restart: unless-stopped networks: @@ -304,7 +304,7 @@ services: - appwrite-uploads:/storage/uploads influxdb: - image: influxdb:1.6 + image: influxdb:1.8-alpine container_name: appwrite-influxdb restart: unless-stopped networks: diff --git a/docker-compose.yml b/docker-compose.yml index 05e5a36692..1513fe895f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -320,9 +320,9 @@ services: # - RELAY_FROM_HOSTS=192.168.0.0/16 ; *.yourdomain.com # - SMARTHOST_HOST=smtp # - SMARTHOST_PORT=587 - + redis: - image: redis:5.0 + image: redis:6.0-alpine3.12 container_name: appwrite-redis restart: unless-stopped networks: @@ -338,9 +338,9 @@ services: - appwrite volumes: - appwrite-uploads:/storage/uploads - + influxdb: - image: influxdb:1.6 + image: influxdb:1.8-alpine container_name: appwrite-influxdb restart: unless-stopped networks: From 892894fb7755832b487467f699f7346fa944901d Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sun, 27 Sep 2020 18:01:30 +0300 Subject: [PATCH 10/12] Updated traefik to v2.3 --- docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 1513fe895f..19388e4635 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ version: '3' services: traefik: - image: traefik:2.2 + image: traefik:2.3 container_name: appwrite-traefik command: - --log.level=DEBUG @@ -322,7 +322,7 @@ services: # - SMARTHOST_PORT=587 redis: - image: redis:6.0-alpine3.12 + image: redis:6.0-alpine container_name: appwrite-redis restart: unless-stopped networks: From 89cd8a529355af0fdd86fe9be2babb0fc462a247 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sun, 27 Sep 2020 18:05:36 +0300 Subject: [PATCH 11/12] Updated changelog --- CHANGES.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 66e4c7f720..0682227996 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -36,6 +36,9 @@ - Removed user roles attribute from user object (can be fetched from /v1/teams/memberships) ** - Removed type attribute from session object response (used only internally) - ** - might be changed before merging to master +- Upgraded Traefik image to version 2.3 +- Upgraded Redis Docker image to version 6.0 (alpine) +- Upgraded Influxdb Docker image to version 1.8 (alpine) ## Breaking Changes (Read before upgrading!) - **Deprecated** `first` and `last` query params for documents list route in the database API From aad8bdf4a5c026cdb63d4b925ca5f8673f6cb1ba Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sun, 27 Sep 2020 18:18:18 +0300 Subject: [PATCH 12/12] Updated Traefik version --- app/views/install/compose.phtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/install/compose.phtml b/app/views/install/compose.phtml index e2e9d2276d..49d599a7dd 100644 --- a/app/views/install/compose.phtml +++ b/app/views/install/compose.phtml @@ -7,7 +7,7 @@ $version = $this->getParam('version', ''); services: traefik: - image: traefik:2.2 + image: traefik:2.3 container_name: appwrite-traefik command: - --providers.file.directory=/storage/config