Merge pull request #62 from AppFlowy-IO/nginx
Nginx: Routing SSL and Non SSL
This commit is contained in:
commit
a201cceb9b
|
|
@ -1,5 +1,17 @@
|
|||
version: '3'
|
||||
services:
|
||||
nginx:
|
||||
image: nginx
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
depends_on:
|
||||
- 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: .
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ services:
|
|||
nginx:
|
||||
image: nginx
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
- 9997:9997
|
||||
depends_on:
|
||||
- appflowy_cloud
|
||||
- gotrue
|
||||
|
|
|
|||
|
|
@ -10,20 +10,24 @@ 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 /authorize {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue