HACKER Q&A
📣 ponyous

Infrastructure setup for relatively easy app?


Hey HN!

We are currently experiencing some issues with our staging environment and would like to set up something to replace it. And in the future we'll also need production environment which will have extra requirements.

There are 3 main infrastructure components:

  - Postgres (we need PostGIS extension)
  - Redis (we use it as a cache, so data doesn't need to be persisted)
  - NodeJS (we have it dockerized already)
Staging Requirements:

  - So we can easily push a new version of the NodeJS app (docker image) to be updated from the CI
  - So we can easily run migrations/seeds (so far we've been running a docker image in the cloud but instead of starting it we run migration command)
Production Requirements:

  - Postgres Backups
  - Alerting/monitoring system (we were thinking of prometheus and grafana but happy to hear suggestions)
  - Auto scale
  - Auto Failover
  - Load balancing
  - Deployable from CI as well
I have used a bunch of different technologies in the past, but prefer way more to focus on development than infrastructure, so we are looking for something easy to maintain, something that could ideally be transferred between hosting providers. Managed K8S by DigitalOcean seems to be like the good option, but I am not sure I want to pull in the complexity of k8s for a team as small as ours.

What would you do in my situation?

ps. are databases like postgres supposed to be running inside containers and not on bare metal? Isn't performance affected a lot?


  👤 verdverm Accepted Answer ✓
W put a client with a very similar stack on GKE / GCP. They are quite happy with the reliability and ease with which they can get software through the process.

We could do something similar in about 20 hours. Email me if you are interested to talk further.