[Bug] APPFLOWY_DATABASE_URL configuration does not take effect
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:
- Create an
appflowydatabase in postgres and create anappflowyuser to grant ownership of theappflowydatabase.And this user does not have read/write access to thepostgresdatabase. - Create docker container for AppFlowy-Cloud, env configure
APPFLOWY_DATABASE_URL=postgres://appflowy:password@postgres:5432/appflowy - Start the docker container
- 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
If I grant the
appflowy account to read and write to the postgres database, I can see the database being written to
But that's not the result I want, I want it to write to the
appflowy database
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.
Currently you can use the APPFLOWY_DATABASE_NAME environment variable to specify the database name
in the future iterations, we will remove APPFLOWY_DATABASE_NAME. To ensure compatibility, set database name in both env var