Skip to content

Instantly share code, notes, and snippets.

@thomasboyt
Last active August 12, 2016 22:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thomasboyt/6b32d7707d42abd56080ac254420d090 to your computer and use it in GitHub Desktop.
Save thomasboyt/6b32d7707d42abd56080ac254420d090 to your computer and use it in GitHub Desktop.

Deployment Goals

  1. Deploy static site frontend to somewhere that properly cache busts everything
  2. Deploy Node.js WebSockets backend with to somewhere that will, long-term, give me the option to easily add a Redis instance
  3. Connect frontend in (1) to (2)
  4. Spend no less than like $10/month on this whole thing (excepting like a domain and DNS)

Candidates

My DigitalOcean VPS

I have a VPS I've been using to host a lot of my games. However, I'm sick of creating custom Nginx configs for each subdomain, setting up LetsEncrypt for each subdomain, etc. It's a lot of boilerplate work. Plus, if I decide to add persistence to a game, requiring Redis or Postgres or something, that becomes a lot more extra upkeep. Plus, I don't have a great deployment story for my VPS right now - I'm using flightplan to deploy + forever to supervise, which both have lots of issues I don't want to get into right now.

Heroku

Heroku has Node hosting, which is good. It also makes it very easy to add Redis, or Postgres, or any number of other long-term persistence options. The pricing model seems pretty good for this project, and I think that I can do everything that I want for free.

Unfortunately, Heroku, somehow, after years of existence, still does not have a static hosting product. And I don't want to host my game through some sort of Node static server because that just seems like a pointless performance hit, and one that adds code complexity to my backend server.

I also don't really like the Heroku buildpack strategy for static assets, since I don't like building static assets on the server. Prefer to build locally and send them to a server to host.

surge.sh

Surge is static-only, so it'd only cover half of my use case. Still, I've used it to throw up static projects and I absolutely love it. Surge is basically the static hosting interface I wish my DigitalOcean VPS had. It's just one command to deploy an arbitrary folder to an arbitrary subdomain; it's incredible.

I could use Surge in conjunction with another service on this list for the actual backend hosting.

zeit.co/now

Now is a neat product that seems to try to abstract backend hosting in the same way Surge abstracts frontend hosting. It's a novel idea, but one that seems very limited.

First, the free product is basically pointless, limited to a hilariously paltry 20 deploys a month. The paid plan is $15/month, which is over my budget for this project.

Second, if I wanted to add any sort of persistence layer (Redis or Postgres or w/e) to this project, I'd be looking at using another service in addition to Now, which is a lot of extra complexity.

AWS Products?

So, uh, I don't really understand AWS. I've tried to use S3 and every time it's been a fucking nightmare that has made me wish I just hosted my apps out of a Dropbox or something.

Anyways, they have 8,000 products, and I'm sure combination of them - let's say S3, Elastic Beanstalk, and RDS? - would work here. But I'm one man, and not an ops team, and I'd also like to point to my limited budget again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment