spring boot + postgresql

hiya, is it possible to connect to the db on localhost to check if it works and deploy the app after that?

spring.datasource.url=jdbc:postgresql://db.internal:5432/db
spring.datasource.username=postgres
spring.datasource.password=password

this kind of connection didnt work for me and got me the exception such as

.UnknownHostException: db.internal

makes me think i can only connect to the db once the app is deployed? otherwise i won’t be able to check if it’s working correctly?

Are you connected to the wireguard profile from fly wg?

no, i’m not

Hey, were you able to solve the problem? I am also dealing with the same problem right now

yeah, if you want to use it on your pc, not internal you need to download wireguard and activate fly profile and stuff, there’s guide in documentation if i remember correctly

1 Like

You’re correct @arthur

Here’s the specific section of that doc:

There’s a tl;dr in there too

Fly’s command line can generate you a tunnel configuration file with private keys already embedded. You can load that file into your local WireGuard application to create a tunnel. Activate the tunnel and you’ll be using the internal Fly DNS service which resolves .internal addresses - and passes on other requests to Google’s DNS for resolution.

I’ve been using it on my Mac for a long time and just today used on ubuntu and works like a charm

Hope this helps @dafeon

thank you that was a helpful documentation. Sorry I am kind of new to this, if I use wireguard for private access, how would I do it for public access? Is there another documentation for that?

To make your app public you need to assign public IPs and have a http_services section. We usually do both for you when you create a new app so check your fly.toml and fly ips list but just in case it’s not there, here’s the docs: