6 ms·
Ask HN: 2 apps, 1 server?
Hi HN,
I'm currently working in a project that implies to develop an API (Rails + Postgres) and a Telegram bot (Python).
I have access to one server, so I'm looking for the best way to allow those two apps to live together. Some ideas:
* Run both apps, different ports
* Redirect an API route to the bot internally (I don't like it)
* Use another Python app to redirect routes to the right app.
Do you have any suggestion? I read about using multiple apps on the same server, but what's the best approach?
Thanks HN!
- Cozumel 9y agoJust set up virtual hosts. One for each app?
- aaossa 9y agoI've never work with virtual hosts. Nice to have something to read about today, thanks!
- kjksf 9y agoI 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 9y agoThanks! I'll read about this today :)