Closed emperorkebab closed 1 month ago
@tangyang9464 @JalinWang @imp2002
@emperorkebab I'm not going to debug for your Dockerfile. You need to look carefully at the official docs: https://casdoor.org/docs/basic/try-with-docker/#get-the-image . Follow the instructions in it.
Hi i the problem is somewhere in the ORM implementation, i think it's the same whether a docker compose file is used or not. I have also seen other users online say they struggle to make casdoor work with postgres, so i don't think i'm alone to have this bug
@emperorkebab you created that db by your code, that db doesn't work. It's your own responsibility. Ask in Stackoverflow as a programming question, not here. This place is more for Casdoor bug report, not fixing your own issue.
Postgres doesn't work with the current version of casdoor
Here is my docker compose file
Log using setting 1:
myiam container:
mydb container:
Log using setting 2:
myiam container:
mydb container:
The same as using setting 1 (without the last
FATAL: database "db_user" does not exist
lines)The error for setting2 is expected because casdoor doesn't use postgres connection uri. But setting1 error is unexpected because it uses the postgres connection string in accordance with the casdoor documentation
It would be nice to support postgres connection uri, or fix the current connection method please
The log points to this line: https://github.com/casdoor/casdoor/blob/2daf26aa884dfe3f27efb25382d111bc1efa3af5/object/ormer.go#L96 I can successfully log into the database with pgadmin using
db_user
&db_password
(the "myiam" db is there but empty) so the user is created, and it seems that the error is in casdoor being the database username is used as the database name?