If it was a certificate issue I'd expect youd just get an error from your browser saying the cert is invalid or expired.
If I had to guess though you're running into a nat reflection issue: https://nordvpn.com/cybersecurity/glossary/nat-loopback/
Read up on that. But you may need to provide different DNS entries if you're inside or outside your LAN or add a NAT hairpin rule to your router. But this is only applicable if you're exposing the same service to the WWW.
Some other things to try though:
- Have you tried just pinging the address? Is the DNS resolution returning the address you expect?
- Whats in your nginx logs? Do you see anything when you try and connect?
- Within your nginx container can you ping your service directly? Is something blocking nginx from accessing the site?
To also add to the other comments: because the government doesn't want or even need to have a balanced "checkbook".
Assume for example you want to buy something from me. But you only have "don bucks". So you buy a widget from me and I charge you 10 "don bucks".
Problem though, through taxes you've only got 5 bucks left. So you just create 5 bucks and add it to your pile. (Deficit spending) Now if you don't balance that with a loan, your "don bucks" are now worth less because why would I want one of your "don bucks" when tomorrow you could just create a million of them for no reason. (Hyperinflation) So you instead borrow 5 bucks from a friend of yours with a promise to give him back 6 tomorrow. (Bonds)
I still sell you my widget for 10 "don bucks" but now what can I spend my newly acquired "don bucks" on? Well, since everyone has their own currency I ultimately have to spend it on you. This means I end up giving you those 10 bucks back in hopes that you'll either give me more in return (another loan/bond) or give me back my own currency from money I've traded to you.
So in the end spending more than you make (at the nation state level) can be a net boon on the economy as you effectively create a vendor lock in, similar to how companies push their gift cards, etc ... because that money is only good in one place. You just have to make sure not to spend too much beyond your means because every dollar you create this way adds to inflation a little bit. So if you create too much then inflation gets out of hand and you end up with hyperinflation and now every one of your citizens wants to get rid of your money because they'll lose too much before they can give it back.