#Connect to docker redis from local django app
31 messages · Page 1 of 1 (latest)
you already ported it
But it is not working!
did you restart it?
I got this error: conn = _connect(dsn, connection_factory=connection_factory, **kwasync) django.db.utils.OperationalError: connection to server at "127.0.0.1", port 5432 failed: FATAL: password authentication failed for user "mayan" connection to server at "127.0.0.1", port 5432 failed: FATAL: password authentication failed for user "mayan"
Yes
Well then it worked!
You got through to redis
What ?? It shows that the database connection is failing
did you read what the error says?
It's what I posted above
Seems like the host isn't correct
no
that's not the error
Read the last part of the error
It's quite obvious if you ask me
The password you used is wrong
Isn't it the same password show on docker when I inspect the container ?
what?
I noticed it was trying to connect to another postgres database running on my machine, after stopping it, I got this error instead:
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
django.db.utils.OperationalError: connection to server at "127.0.0.1", port 5432 failed: Connection refused
Is the server running on that host and accepting TCP/IP connections?
I mean this
well postgres and redis are two different things
the passwords may be different
Yeah I got that .. I think redis is working, but the database connection is the one that is failing
Well, postgres has not been ported to your localhost:5432
Try bringing up compose again
OK
@vague viper I decided to use vscode dev containers, it should be easier than this, I've installed the extention and attached to container, what should I do next?