From 79c8b9478f42c669217514946c62dee25b0d585b Mon Sep 17 00:00:00 2001 From: Fu Zi Xiang Date: Mon, 18 Sep 2023 20:49:54 +0800 Subject: [PATCH 1/3] feat: nginx reroute callback and verify --- docker-compose-dev.yml | 13 +++++++++++++ docker-compose.yml | 2 +- nginx/nginx.conf | 21 +++++++++++---------- 3 files changed, 25 insertions(+), 11 deletions(-) diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index 6b54ae68..8cd91efe 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -1,5 +1,18 @@ version: '3' services: + nginx: + image: nginx + ports: + - 80:80 + - 443:443 + depends_on: + - appflowy_cloud + - gotrue + volumes: + - ./nginx/nginx.conf:/etc/nginx/nginx.conf + - ./nginx/ssl/certificate.crt:/etc/nginx/ssl/certificate.crt + - ./nginx/ssl/private_key.key:/etc/nginx/ssl/private_key.key + postgres: build: context: . diff --git a/docker-compose.yml b/docker-compose.yml index 4562e4b1..73f36f8b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,8 +3,8 @@ services: nginx: image: nginx ports: + - 80:80 - 443:443 - - 9997:9997 depends_on: - appflowy_cloud - gotrue diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 50fb1c66..bb7a0c2e 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -10,20 +10,21 @@ http { ssl_certificate /etc/nginx/ssl/certificate.crt; ssl_certificate_key /etc/nginx/ssl/private_key.key; + listen 80; listen 443 ssl; + + # GoTrue + location /verify { + proxy_pass http://gotrue:9999; + } + location /callback { + proxy_pass http://gotrue:9999; + } + + # AppFlowy-Cloud location / { proxy_pass http://appflowy_cloud:8000; } } - server { - ssl_certificate /etc/nginx/ssl/certificate.crt; - ssl_certificate_key /etc/nginx/ssl/private_key.key; - - listen 9997 ssl; - location / { - proxy_pass http://gotrue:9999; - } - } - } From 2352f3dcab6dc08241c11713f389e2517c7c84a5 Mon Sep 17 00:00:00 2001 From: Fu Zi Xiang Date: Mon, 18 Sep 2023 20:57:36 +0800 Subject: [PATCH 2/3] fix: add authorize for gotrue --- nginx/nginx.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nginx/nginx.conf b/nginx/nginx.conf index bb7a0c2e..f8b75b78 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -17,6 +17,9 @@ http { location /verify { proxy_pass http://gotrue:9999; } + location /authorize { + proxy_pass http://gotrue:9999; + } location /callback { proxy_pass http://gotrue:9999; } From 7c2204f41a857927862368ba645c72812bdcb780 Mon Sep 17 00:00:00 2001 From: Fu Zi Xiang Date: Mon, 18 Sep 2023 21:18:58 +0800 Subject: [PATCH 3/3] fix: dev: remove appflowy_cloud as dep in docker compose --- docker-compose-dev.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index 8cd91efe..736bae23 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -6,7 +6,6 @@ services: - 80:80 - 443:443 depends_on: - - appflowy_cloud - gotrue volumes: - ./nginx/nginx.conf:/etc/nginx/nginx.conf