Elixir/Phoenix multiple applications on same machine

1.1k views Asked by At

I have an app constantly running on the system, serving everything on localhost:4000.

After some time, I decide to add more functionality and add another application (also elixir/phoenix), that takes some data from the #1 app database and presents it within it self, for example on localhost:4001. But as a separate app, so I don't have to recompile the #1 app.

I believe this can be called a platform. There is one main application always running, and other secondary apps that can be installed and accessed.

Here are my questions:

1) Whether it is a good idea to have multiple apps on the same machine simply running on different ports? (Switching localhost:4000 or 4001 depending on what app you need)

2) I was thinking to install secondary apps with some python script to download the source code, compile and launch app in the background, so the newly downloaded app becomes available on some assigned port. Am I'm on the right track here?

Apologize in advance if this is a dumb question, but I'm just not sure what are the "good" practices when building platform like this - main app + secondary apps installed on demand. Above I presented what I think is the way to go, but I can be completely wrong. So, if you have any suggestions/recommendations regarding building a platform like this, please let me know.

0

There are 0 answers