feat: Minio web nginx (#122)

* feat: add minio web UI

* fix: minio redirect url

* fix: simplify minio config
This commit is contained in:
Zack 2023-10-18 13:35:19 +08:00 committed by GitHub
parent 9dc7bbeee0
commit d6c0b7780b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 38 additions and 5 deletions

View File

@ -5,6 +5,8 @@ services:
ports:
- 9000:9000
- 9001:9001
environment:
- MINIO_BROWSER_REDIRECT_URL=http://localhost/minio
command: server /data --console-address ":9001"
postgres:

View File

@ -6,6 +6,7 @@ services:
- 80:80
- 443:443
depends_on:
- minio
- appflowy_cloud
- gotrue
- admin_frontend
@ -19,6 +20,8 @@ services:
ports:
- 9000:9000
- 9001:9001
environment:
- MINIO_BROWSER_REDIRECT_URL=http://localhost/minio
command: server /data --console-address ":9001"
postgres:

View File

@ -18,9 +18,9 @@ http {
listen 80;
listen 443 ssl;
# GoTrue
location /gotrue/ {
rewrite ^/gotrue(/.*)$ $1 break;
# GoTrue
location /gotrue/ {
rewrite ^/gotrue(/.*)$ $1 break;
proxy_pass http://gotrue:9999;
}
@ -39,7 +39,35 @@ http {
proxy_pass http://appflowy_cloud:8000;
}
# PgAdmin
# Minio Web UI
# Derive from: https://min.io/docs/minio/linux/integrations/setup-nginx-proxy-with-minio.html
location /minio/ {
rewrite ^/minio/(.*) /$1 break;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-NginX-Proxy true;
## This is necessary to pass the correct IP to be hashed
real_ip_header X-Real-IP;
proxy_connect_timeout 300;
## To support websockets in MinIO versions released after January 2023
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
# Some environments may encounter CORS errors (Kubernetes + Nginx Ingress)
# Uncomment the following line to set the Origin request to an empty string
# proxy_set_header Origin '';
chunked_transfer_encoding off;
proxy_pass http://minio:9001;
}
# PgAdmin
location /pgadmin/ {
proxy_set_header X-Script-Name /pgadmin;
proxy_set_header X-Scheme $scheme;
@ -48,7 +76,7 @@ http {
proxy_redirect off;
}
# Admin Frontend
# Admin Frontend
location / {
proxy_set_header X-Scheme $scheme;
proxy_set_header Host $host;