Serving 1< Phoenix Web Apps on a Linux VM with NGINX
- Dominant language
- No language data
- Stars
- 664
- Forks
- 41
- PR merge metrics
- No merged PRs in 30d
Description
> As a `developer` wanting to **deploy* (_1< small-ish phoenix_) **web app**(s) on a (_single_) **VM**,
> I need a way to `proxy` the Phoenix app(s) _transparently_
> so that I can still use `edeliver` to deploy the app(s) using Travis-CI
## Context
We can _easily_ deploy apps to Heroku https://github.com/dwyl/learn-heroku ✅
But apps deployed for "free" will go to "sleep" https://blog.heroku.com/app_sleeping_on_heroku 💤
see: https://stackoverflow.com/questions/2606190/why-are-my-basic-heroku-apps-taking-two-seconds-to-load and https://www.quora.com/Scalability/Scalability-How-does-Heroku-work-2
and thus take a `while` to respond for the _average_ visitor/user ... ⌛️ 😞
If we instead chose to _pay_ for Heroku (_as we do for https://www.dwyl.com ..._) it will cost $7/month (_min_) but as soon as we want to store _any_ data it's another $10/month (_min_)
By contrast a $5/month VM can host _several_ Phoenix apps (_which each average **50Mb RAM**_)
including _millions_ of rows of data in PostgreSQL
## Todo
+ [x] remove IPTables port forwarding from 80 --> 4000 (_let NGINX handle that_)
+ [x] configure NGINX to proxy a basic Phoenix App on a given TCP Port using virtualhost
+ [x] configure a subdomain to point to the virtualhost
+ [x] get certificate from let's encrypt
+ [x] configure SSL/TLS for the subdomain
Contributor guide
Assessment
This issue has not been assessed yet.