6 months ago
What is the best way to have multiple applications running on one service?
I currently want to have multiple applications running on one service.
One fastapi application on port 8080 and a celery with a celery flower application on port 5555.
The solution I came up with is each port number gets their own custom subdomain.
So fastapi.domain.com would be port 8080 and celery.domain.com would be port 5555.
Is that the best way to do multiple applications on one server? multiple subdomains for each port number?
0 Replies
If you have multiple services/apps, generally what you would want to do is to deploy them as separate containers. This is how it's supposed to be done and this way you won't have any issues with port number collisions inside containers or any other weird stuff.
1 application = 1 one container, and then you can connect them to one another using private network
how to set up a private network? is a railway.app project a private network?
and then i would use private network connections with my database?
6 months ago
Yes and yes. Take a look at https://docs.railway.com/guides/private-networking for more info.