AppFlowy-Cloud icon indicating copy to clipboard operation
AppFlowy-Cloud copied to clipboard

[Bug] APPFLOWY_DATABASE_URL configuration does not take effect

Open keven1024 opened this issue 1 year ago • 2 comments

Describe the bug AppFlowy-Cloud's APPFLOWY_DATABASE_URL configuration doesn't work for non-postgres database names

To Reproduce Steps to reproduce the behavior:

  1. Create an appflowy database in postgres and create an appflowy user to grant ownership of the appflowy database.And this user does not have read/write access to the postgres database.
  2. Create docker container for AppFlowy-Cloud, env configure APPFLOWY_DATABASE_URL = postgres://appflowy:password@postgres:5432/appflowy
  3. Start the docker container
  4. See error

Expected behavior AppFlowy-Cloud should adhere to the database name configured by env to write to the corresponding database, not to the postgres database.

Screenshots docker start logs image If I grant the appflowy account to read and write to the postgres database, I can see the database being written to image But that's not the result I want, I want it to write to the appflowy database image

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context

  • Environment [e.g. flutter doctor -v or rustup show] Add any other context about the problem here.

keven1024 avatar May 12 '24 17:05 keven1024

Currently you can use the APPFLOWY_DATABASE_NAME environment variable to specify the database name

smartyhero avatar May 13 '24 03:05 smartyhero

in the future iterations, we will remove APPFLOWY_DATABASE_NAME. To ensure compatibility, set database name in both env var

speed2exe avatar May 17 '24 07:05 speed2exe