The App Platform is working great, however a major drawback we’re seeing is that there is no option to give it a dedicated, static IP (or a range of IP’s). This means we cannot whitelist our applications running on the App Platform to access resources hosted elsewhere.
I’m certainly not the only one running into this problem, as there’s a suggestion with a bunch of upvotes already about this topic: https://ideas.digitalocean.com/digitalocean/p/app-platform-static-ip
However, until DigitalOcean provides this functionality, I was trying to use the following workaround. What if I spin up a Droplet with an NGINX running, which acts as a proxy to those external systems. So my App Platform apps will call this droplet, and the droplet will forward the request. Since we can give reserved IP’s to droplets, this should work; right?
My main question is now, has someone already tried this? I’ve been messing with NGINX configs for the better part of the day, and I’m yet to come up with a working solution. In my case I need to proxy to a MySQL and Postgres DB.
Can anyone a) confirm this should be working, and b) happen to have a working configuration for NGINX (or another proxy solution)?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $200 of credit to try our products over 60 days!
The Nginx config should looks something like this:
Note that the
streamdirective, would need to be outside the
httpdirective in order for this to work.
Let me know how it goes and if you are getting any specific errors!
While this approach works, there’s apparently still no way to add your APP in the same VPC as your droplet; so for this to work you need to allow ALL IPV4 connections to your droplet; which is far from ideal.