Integration Chirpstack (Docker) with postgres (localhost)

Hello Guys, I’m trying to connect via chirpstack (docker) with postgres (localhost) on the same server. The problem is that port 5432 is blocked for external access only allowing internal access.
How could I link doker compose directly to my localhost?