AppFlowy-IO/AppFlowy-Cloud

[Bug] Can't access MinIO GUI by AppFlowy-Cloud GUI

Closed this issue · 6 comments

Describe the bug
Can't access MinIO GUI from AppFlowy-Cloud GUI

To Reproduce
Steps to reproduce the behavior:

  1. Login AppFLowy-Cloud by admin accout (admin@example.com/password)
  2. Click on 'Admin' on upper right
  3. Click on 'MinIO’
  4. See error: MinIO GUI did't show

Expected behavior
Solving the problem

Screenshots
image
image

Desktop (please complete the following information):

  • OS: [Windows10 64bit ]
  • Browser [edge]
  • Version [latest]

Additional context

  • Environment [selfhost in Windows10 64bit with WSL2]

- .env:

APPFLOWY_GOTRUE_BASE_URL=http://gotrue:9999
APPFLOWY_DATABASE_URL=postgres://postgres:password@postgres:5432/postgres
APPFLOWY_ACCESS_CONTROL=true
APPFLOWY_WEBSOCKET_MAILBOX_SIZE=6000
APPFLOWY_DATABASE_MAX_CONNECTIONS=40

ADMIN_FRONTEND_REDIS_URL=redis://redis:6379
ADMIN_FRONTEND_GOTRUE_URL=http://gotrue:9999

GOTRUE_JWT_SECRET=hello456
GOTRUE_JWT_EXP=7200
GOTRUE_MAILER_AUTOCONFIRM=true
GOTRUE_RATE_LIMIT_EMAIL_SENT=100

GOTRUE_SMTP_HOST=smtp.gmail.com
GOTRUE_SMTP_PORT=465
GOTRUE_SMTP_USER=email_sender@some_company.com
GOTRUE_SMTP_PASS=email_sender_password
GOTRUE_SMTP_ADMIN_EMAIL=comp_admin@some_company.com

GOTRUE_ADMIN_EMAIL=admin@example.com
GOTRUE_ADMIN_PASSWORD=password

API_EXTERNAL_URL=http://192.168.0.137

GOTRUE_DATABASE_URL=postgres://supabase_auth_admin:root@postgres:5432/postgres

GOTRUE_EXTERNAL_GOOGLE_ENABLED=false
GOTRUE_EXTERNAL_GOOGLE_CLIENT_ID=
GOTRUE_EXTERNAL_GOOGLE_SECRET=
GOTRUE_EXTERNAL_GOOGLE_REDIRECT_URI=http://your-host/gotrue/callback

GOTRUE_EXTERNAL_GITHUB_ENABLED=false
GOTRUE_EXTERNAL_GITHUB_CLIENT_ID=
GOTRUE_EXTERNAL_GITHUB_SECRET=
GOTRUE_EXTERNAL_GITHUB_REDIRECT_URI=http://your-host/gotrue/callback

GOTRUE_EXTERNAL_DISCORD_ENABLED=false
GOTRUE_EXTERNAL_DISCORD_CLIENT_ID=
GOTRUE_EXTERNAL_DISCORD_SECRET=
GOTRUE_EXTERNAL_DISCORD_REDIRECT_URI=http://your-host/gotrue/callback

GOTRUE_EXTERNAL_APPLE_ENABLED=false
GOTRUE_EXTERNAL_APPLE_CLIENT_ID=
GOTRUE_EXTERNAL_APPLE_SECRET=
GOTRUE_EXTERNAL_APPLE_REDIRECT_URI=http://your-host/gotrue/callback

APPFLOWY_S3_CREATE_BUCKET=true
APPFLOWY_S3_USE_MINIO=true
APPFLOWY_S3_MINIO_URL=http://minio:9000
APPFLOWY_S3_ACCESS_KEY=minioadmin
APPFLOWY_S3_SECRET_KEY=minioadmin
APPFLOWY_S3_BUCKET=appflowy
*APPFLOWY_S3_REGION=us-east-1

APPFLOWY_MAILER_SMTP_HOST=smtp.gmail.com
APPFLOWY_MAILER_SMTP_PORT=465
APPFLOWY_MAILER_SMTP_USERNAME=email_sender@some_company.com
APPFLOWY_MAILER_SMTP_PASSWORD=email_sender_password

RUST_LOG=info

PGADMIN_DEFAULT_EMAIL=admin@example.com
PGADMIN_DEFAULT_PASSWORD=password

PORTAINER_PASSWORD=password1234

CLOUDFLARE_TUNNEL_TOKEN=

NGINX_PORT=80
NGINX_TLS_PORT=443

*GOTRUE_DATABASE_URL=postgres://supabase_auth_admin:root@:/$POSTGRES_DB
*APPFLOWY_DATABASE_URL=postgres://POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST:5432/$POSTGRES_DB

APPFLOWY_AI_OPENAI_API_KEY=
APPFLOWY_AI_SERVER_PORT=5001
APPFLOWY_AI_SERVER_HOST=ai
APPFLOWY_AI_DATABASE_URL=postgresql+psycopg://postgres:password@postgres:5432/postgres
APPFLOWY_LOCAL_AI_TEST_ENABLED=false

AppFlowy History
APPFLOWY_GRPC_HISTORY_ADDRS=http://localhost:50051
APPFLOWY_HISTORY_REDIS_URL=redis://redis:6379
APPFLOWY_HISTORY_DATABASE_URL=postgres://postgres:password@postgres:5432/postgres

AppFlowy Indexer
APPFLOWY_INDEXER_ENABLED=true
APPFLOWY_INDEXER_DATABASE_URL=postgres://postgres:password@postgres:5432/postgres
APPFLOWY_INDEXER_REDIS_URL=redis://redis:6379

APPFLOWY_COLLABORATE_MULTI_THREAD=false
APPFLOWY_COLLABORATE_REMOVE_BATCH_SIZE=100

APPFLOWY_WORKER_REDIS_URL=redis://redis:6379
APPFLOWY_WORKER_DATABASE_URL=postgres://postgres:password@postgres:5432/postgres

APPFLOWY_WEB_URL=http://localhost:3000

##- docker-compose.yml

services:
nginx:
restart: on-failure
image: nginx
ports:
- ${NGINX_PORT:-80}:80 # Disable this if you are using TLS
- ${NGINX_TLS_PORT:-443}:443
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

minio:
restart: on-failure
image: minio/minio
environment:
- MINIO_BROWSER_REDIRECT_URL=http://minio:9000
- MINIO_ROOT_USER=${APPFLOWY_S3_ACCESS_KEY:-minioadmin}
- MINIO_ROOT_PASSWORD=${APPFLOWY_S3_SECRET_KEY:-minioadmin}
command: server /data --console-address ":9001"
volumes:
- minio_data:/data

postgres:
restart: on-failure
image: pgvector/pgvector:pg16
environment:
- POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_DB=${POSTGRES_DB:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-password}
- POSTGRES_HOST=${POSTGRES_HOST:-postgres}
volumes:
- ./migrations/before:/docker-entrypoint-initdb.d
- postgres_data:/var/lib/postgresql/data

redis:
restart: on-failure
image: redis

gotrue:
restart: on-failure
build:
context: .
dockerfile: docker/gotrue.Dockerfile
image: appflowyinc/gotrue:${GOTRUE_VERSION:-latest}
environment:
- GOTRUE_SITE_URL=appflowy-flutter://
- URI_ALLOW_LIST=*
- GOTRUE_JWT_SECRET=${GOTRUE_JWT_SECRET}
- GOTRUE_JWT_EXP=${GOTRUE_JWT_EXP}
- GOTRUE_DB_DRIVER=postgres
- API_EXTERNAL_URL=${API_EXTERNAL_URL}
- DATABASE_URL=${GOTRUE_DATABASE_URL}
- PORT=9999
- GOTRUE_SMTP_HOST=${GOTRUE_SMTP_HOST}
- GOTRUE_SMTP_PORT=${GOTRUE_SMTP_PORT}
- GOTRUE_SMTP_USER=${GOTRUE_SMTP_USER}
- GOTRUE_SMTP_PASS=${GOTRUE_SMTP_PASS}
- GOTRUE_MAILER_URLPATHS_CONFIRMATION=/gotrue/verify
- GOTRUE_MAILER_URLPATHS_INVITE=/gotrue/verify
- GOTRUE_MAILER_URLPATHS_RECOVERY=/gotrue/verify
- GOTRUE_MAILER_URLPATHS_EMAIL_CHANGE=/gotrue/verify
- GOTRUE_SMTP_ADMIN_EMAIL=${GOTRUE_SMTP_ADMIN_EMAIL}
- GOTRUE_SMTP_MAX_FREQUENCY=${GOTRUE_SMTP_MAX_FREQUENCY:-1ns}
- GOTRUE_RATE_LIMIT_EMAIL_SENT=${GOTRUE_RATE_LIMIT_EMAIL_SENT:-100}
- GOTRUE_MAILER_AUTOCONFIRM=${GOTRUE_MAILER_AUTOCONFIRM:-false}

  - GOTRUE_EXTERNAL_GOOGLE_ENABLED=${GOTRUE_EXTERNAL_GOOGLE_ENABLED}
  - GOTRUE_EXTERNAL_GOOGLE_CLIENT_ID=${GOTRUE_EXTERNAL_GOOGLE_CLIENT_ID}
  - GOTRUE_EXTERNAL_GOOGLE_SECRET=${GOTRUE_EXTERNAL_GOOGLE_SECRET}
  - GOTRUE_EXTERNAL_GOOGLE_REDIRECT_URI=${GOTRUE_EXTERNAL_GOOGLE_REDIRECT_URI}

  - GOTRUE_EXTERNAL_GITHUB_ENABLED=${GOTRUE_EXTERNAL_GITHUB_ENABLED}
  - GOTRUE_EXTERNAL_GITHUB_CLIENT_ID=${GOTRUE_EXTERNAL_GITHUB_CLIENT_ID}
  - GOTRUE_EXTERNAL_GITHUB_SECRET=${GOTRUE_EXTERNAL_GITHUB_SECRET}
  - GOTRUE_EXTERNAL_GITHUB_REDIRECT_URI=${GOTRUE_EXTERNAL_GITHUB_REDIRECT_URI}

  - GOTRUE_EXTERNAL_DISCORD_ENABLED=${GOTRUE_EXTERNAL_DISCORD_ENABLED}
  - GOTRUE_EXTERNAL_DISCORD_CLIENT_ID=${GOTRUE_EXTERNAL_DISCORD_CLIENT_ID}
  - GOTRUE_EXTERNAL_DISCORD_SECRET=${GOTRUE_EXTERNAL_DISCORD_SECRET}
  - GOTRUE_EXTERNAL_DISCORD_REDIRECT_URI=${GOTRUE_EXTERNAL_DISCORD_REDIRECT_URI}

appflowy_cloud:
restart: on-failure
environment:
- RUST_LOG=${RUST_LOG:-info}
- APPFLOWY_ENVIRONMENT=production
- APPFLOWY_DATABASE_URL=${APPFLOWY_DATABASE_URL}
- APPFLOWY_REDIS_URI=redis://redis:6379
- APPFLOWY_GOTRUE_JWT_SECRET=${GOTRUE_JWT_SECRET}
- APPFLOWY_GOTRUE_JWT_EXP=${GOTRUE_JWT_EXP}
- APPFLOWY_GOTRUE_BASE_URL=${APPFLOWY_GOTRUE_BASE_URL}
- APPFLOWY_GOTRUE_EXT_URL=${API_EXTERNAL_URL}
- APPFLOWY_GOTRUE_ADMIN_EMAIL=${GOTRUE_ADMIN_EMAIL}
- APPFLOWY_GOTRUE_ADMIN_PASSWORD=${GOTRUE_ADMIN_PASSWORD}
- APPFLOWY_S3_CREATE_BUCKET=${APPFLOWY_S3_CREATE_BUCKET}
- APPFLOWY_S3_USE_MINIO=${APPFLOWY_S3_USE_MINIO}
- APPFLOWY_S3_MINIO_URL=${APPFLOWY_S3_MINIO_URL}
- APPFLOWY_S3_ACCESS_KEY=${APPFLOWY_S3_ACCESS_KEY}
- APPFLOWY_S3_SECRET_KEY=${APPFLOWY_S3_SECRET_KEY}
- APPFLOWY_S3_BUCKET=${APPFLOWY_S3_BUCKET}
- APPFLOWY_S3_REGION=${APPFLOWY_S3_REGION}
- APPFLOWY_MAILER_SMTP_HOST=${APPFLOWY_MAILER_SMTP_HOST}
- APPFLOWY_MAILER_SMTP_PORT=${APPFLOWY_MAILER_SMTP_PORT}
- APPFLOWY_MAILER_SMTP_USERNAME=${APPFLOWY_MAILER_SMTP_USERNAME}
- APPFLOWY_MAILER_SMTP_PASSWORD=${APPFLOWY_MAILER_SMTP_PASSWORD}
- APPFLOWY_ACCESS_CONTROL=${APPFLOWY_ACCESS_CONTROL}
- APPFLOWY_DATABASE_MAX_CONNECTIONS=${APPFLOWY_DATABASE_MAX_CONNECTIONS}
- APPFLOWY_AI_SERVER_HOST=${APPFLOWY_AI_SERVER_HOST}
- APPFLOWY_AI_SERVER_PORT=${APPFLOWY_AI_SERVER_PORT}
build:
context: .
dockerfile: Dockerfile
args:
FEATURES: ""
image: appflowyinc/appflowy_cloud:${APPFLOWY_CLOUD_VERSION:-latest}

admin_frontend:
restart: on-failure
build:
context: .
dockerfile: ./admin_frontend/Dockerfile
image: appflowyinc/admin_frontend:${APPFLOWY_ADMIN_FRONTEND_VERSION:-latest}
environment:
- RUST_LOG=${RUST_LOG:-info}
- ADMIN_FRONTEND_REDIS_URL=${ADMIN_FRONTEND_REDIS_URL:-redis://redis:6379}
- ADMIN_FRONTEND_GOTRUE_URL=${ADMIN_FRONTEND_GOTRUE_URL:-http://gotrue:9999}
- ADMIN_FRONTEND_APPFLOWY_CLOUD_URL=${ADMIN_FRONTEND_APPFLOWY_CLOUD_URL:-http://appflowy_cloud:8000}

ai:
restart: on-failure
image: appflowyinc/appflowy_ai:${APPFLOWY_AI_VERSION:-latest}
environment:
- OPENAI_API_KEY=${APPFLOWY_AI_OPENAI_API_KEY}
- APPFLOWY_AI_SERVER_PORT=${APPFLOWY_AI_SERVER_PORT}
- APPFLOWY_AI_DATABASE_URL=${APPFLOWY_AI_DATABASE_URL}

appflowy_history:
restart: on-failure
image: appflowyinc/appflowy_history:${APPFLOWY_HISTORY_VERSION:-latest}
build:
context: .
dockerfile: ./services/appflowy-history/Dockerfile
environment:
- RUST_LOG=${RUST_LOG:-info}
- APPFLOWY_HISTORY_REDIS_URL=redis://redis:6379
- APPFLOWY_HISTORY_ENVIRONMENT=production
- APPFLOWY_HISTORY_DATABASE_URL=${APPFLOWY_HISTORY_DATABASE_URL}

appflowy_worker:
restart: on-failure
image: appflowyinc/appflowy_worker:${APPFLOWY_WORKER_VERSION:-latest}
build:
context: .
dockerfile: ./services/appflowy-worker/Dockerfile
environment:
- RUST_LOG=${RUST_LOG:-info}
- APPFLOWY_ENVIRONMENT=production
- APPFLOWY_WORKER_REDIS_URL=redis://redis:6379
- APPFLOWY_WORKER_ENVIRONMENT=production
- APPFLOWY_WORKER_DATABASE_URL=${APPFLOWY_WORKER_DATABASE_URL}
- APPFLOWY_S3_USE_MINIO=${APPFLOWY_S3_USE_MINIO}
- APPFLOWY_S3_MINIO_URL=${APPFLOWY_S3_MINIO_URL}
- APPFLOWY_S3_ACCESS_KEY=${APPFLOWY_S3_ACCESS_KEY}
- APPFLOWY_S3_SECRET_KEY=${APPFLOWY_S3_SECRET_KEY}
- APPFLOWY_S3_BUCKET=${APPFLOWY_S3_BUCKET}
- APPFLOWY_S3_REGION=${APPFLOWY_S3_REGION}
- APPFLOWY_MAILER_SMTP_PORT=${APPFLOWY_MAILER_SMTP_PORT}
- APPFLOWY_MAILER_SMTP_USERNAME=${APPFLOWY_MAILER_SMTP_USERNAME}
- APPFLOWY_MAILER_SMTP_PASSWORD=${APPFLOWY_MAILER_SMTP_PASSWORD}
volumes:
postgres_data:
minio_data:

Can you change MINIO_BROWSER_REDIRECT_URL to http://192.168.0.137/minio ?

As a side note: if your intention is to use AppFlowy only on your Windows 10 64, there's no need to install AppFlowy Cloud at all. AppFlowy can be used entirely offline.

If you plan to use AppFlowy on multiple device, then hosting AppFlowy Cloud on your Windows 8 machine actually doesnt help, because your other device will not be able to reach the server on 192.168.0.137. Typically, AppFlowy Cloud is installed on a virtual machine, either from a cloud provider, or a home lab.

Can you change MINIO_BROWSER_REDIRECT_URL to http://192.168.0.137/minio ?

As a side note: if your intention is to use AppFlowy only on your Windows 10 64, there's no need to install AppFlowy Cloud at all. AppFlowy can be used entirely offline.

If you plan to use AppFlowy on multiple device, then hosting AppFlowy Cloud on your Windows 8 machine actually doesnt help, because your other device will not be able to reach the server on 192.168.0.137. Typically, AppFlowy Cloud is installed on a virtual machine, either from a cloud provider, or a home lab.

Thanks for your advise!
Maybe I need to explain more in detail:
I use WSL(virtual linux system) in WIndows to deploy AppFlowy-Cloud by deploy.env and docker-compose.yml;
I can login AppFlowy-Cloud sucessfully by any other device by the hostip: 192.168.0.137
The only problem is MINIO could not access from GUI or ip address,
PGAdmin and Portainer can be accessed by GUI
or by
http://192.168.0.137/pgadmin and http://192.168.0.137/portainer
also sucessed by
localhost/pgadmin and localhost/portainer

What i mean, maybe some settings in deploy.env or docker-compose.yml has problems?

snapshot for login pgadmin
image

snapshot for login portainer
image

snapshot for login minio
image

Do you still get the above issue after setting MINIO_BROWSER_REDIRECT_URL to http://192.168.0.137/minio ?

Yes, only minio can't access, others going well, screen crops showing in my last post above.
Same problems on another linux server machine.
And when I store pics in appflowy, next time I login, pics can't not be found, maybe the same problem with minio accessing.

@mickey3721 Maybe you can turn on the developer's tools in the browser, go to network tab, then refresh the page. it will should show some error relating to why the page doesn't load

However ,the problem has been fixed in latest release