I think my postgres container can't accept remote connections

Has anybody out there ever have a message like this and if so how was it resolved?

sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at “0.0.0.0”, port 5432 failed: Connection refused
Is the server running on that host and accepting TCP/IP connections?

(Background on this error at: Error Messages — SQLAlchemy 1.4 Documentation)
(testvenv)

Can you tell us more about how you run the container, on which operating system and when and where you see the error message?

One thing that I noticed: 0.0.0.0 should be an IP address.

Check if any firewall service can block the connection. Ensure the firewall can allow connection to 5432 port.