I have a Django web application deployed successfully on App Platform. I want to set up a second web service component that serves a different application on a different port (5000). Is this possible within the same app in App Platform?
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.
Hey Timmy! 👋
It’s currently not possible to expose multiple external ports on a single Web Service component on the App Platform. If it works with your setup you could run two separate Web Service Components on DigitalOcean App Platform.
So basically, instead of exposing different ports, you can take advantage of HTTP Request Routes to set up different route prefixes for each service. For example:
/
/api
This allows you to manage multiple services within the same app without worrying about port numbers. You can set up these routes in your app’s configuration to ensure each service handles traffic based on its assigned path.
Alternatively, if you need to keep one of the services internal (i.e., not publicly accessible), you can use Internal Service Routing to manage traffic between services internally without exposing the port publicly. You can read more about it here: Manage Internal Routing.
Let me know if that helps, or if you’d like more specific instructions!
- Bobby
Hello,
Refer to below link for more insights:
https://docs.digitalocean.com/products/app-platform/how-to/manage-internal-routing/
Cheers, Sri Charan