
Ask HN: 2 apps, 1 server? - aaossa
Hi HN,<p>I&#x27;m currently working in a project that implies to develop an API (Rails + Postgres) and a Telegram bot (Python).<p>I have access to one server, so I&#x27;m looking for the best way to allow those two apps to live together. Some ideas:<p>* Run both apps, different ports<p>* Redirect an API route to the bot internally (I don&#x27;t like it)<p>* Use another Python app to redirect routes to the right app.<p>Do you have any suggestion? I read about using multiple apps on the same server, but what&#x27;s the best approach?<p>Thanks HN!
======
kjksf
I moved to "one server per app" model, but in the past what I did to run
multiple apps on one server:

\- create a separate unix user for each app, to separate them

\- each app runs on a different port

\- configure nginx as a proxy with virtual host. Today I might use
[https://caddyserver.com/](https://caddyserver.com/) instead of nginx

\- I would write ansible scripts to automate deployment

~~~
aaossa
Thanks! I'll read about this today :)

------
Cozumel
Just set up virtual hosts. One for each app?

~~~
aaossa
I've never work with virtual hosts. Nice to have something to read about
today, thanks!

