feat: Minio web nginx (#122)
* feat: add minio web UI * fix: minio redirect url * fix: simplify minio config
This commit is contained in:
parent
9dc7bbeee0
commit
d6c0b7780b
|
|
@ -5,6 +5,8 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- 9000:9000
|
- 9000:9000
|
||||||
- 9001:9001
|
- 9001:9001
|
||||||
|
environment:
|
||||||
|
- MINIO_BROWSER_REDIRECT_URL=http://localhost/minio
|
||||||
command: server /data --console-address ":9001"
|
command: server /data --console-address ":9001"
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ services:
|
||||||
- 80:80
|
- 80:80
|
||||||
- 443:443
|
- 443:443
|
||||||
depends_on:
|
depends_on:
|
||||||
|
- minio
|
||||||
- appflowy_cloud
|
- appflowy_cloud
|
||||||
- gotrue
|
- gotrue
|
||||||
- admin_frontend
|
- admin_frontend
|
||||||
|
|
@ -19,6 +20,8 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- 9000:9000
|
- 9000:9000
|
||||||
- 9001:9001
|
- 9001:9001
|
||||||
|
environment:
|
||||||
|
- MINIO_BROWSER_REDIRECT_URL=http://localhost/minio
|
||||||
command: server /data --console-address ":9001"
|
command: server /data --console-address ":9001"
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
|
|
|
||||||
|
|
@ -18,9 +18,9 @@ http {
|
||||||
listen 80;
|
listen 80;
|
||||||
listen 443 ssl;
|
listen 443 ssl;
|
||||||
|
|
||||||
# GoTrue
|
# GoTrue
|
||||||
location /gotrue/ {
|
location /gotrue/ {
|
||||||
rewrite ^/gotrue(/.*)$ $1 break;
|
rewrite ^/gotrue(/.*)$ $1 break;
|
||||||
proxy_pass http://gotrue:9999;
|
proxy_pass http://gotrue:9999;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -39,7 +39,35 @@ http {
|
||||||
proxy_pass http://appflowy_cloud:8000;
|
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/ {
|
location /pgadmin/ {
|
||||||
proxy_set_header X-Script-Name /pgadmin;
|
proxy_set_header X-Script-Name /pgadmin;
|
||||||
proxy_set_header X-Scheme $scheme;
|
proxy_set_header X-Scheme $scheme;
|
||||||
|
|
@ -48,7 +76,7 @@ http {
|
||||||
proxy_redirect off;
|
proxy_redirect off;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Admin Frontend
|
# Admin Frontend
|
||||||
location / {
|
location / {
|
||||||
proxy_set_header X-Scheme $scheme;
|
proxy_set_header X-Scheme $scheme;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue