hayley 365

home

I moved last earthquake . com

28 Oct 2013

2013-10-28 01:09:28 -0500

Hurray for more anti-procrastination. I moved another one of my earthquake sites off of heroku: last earthquake.

I blogged previously about my heroku-hosted earthquake site that was breaking every one or two days. It was by far the site that was dying the most, but I've been intending to move the rest now that I've got a new home for the sites.

Previously, I was having heroku go out the USGS site and update the data when a visitor hit the site and it detected that the earthquake data was out of date. This was the cheap arse way of not having to pay for cron.

But now that I've moved back to a saner approach, the setup now is that I've got a cronjob that goes out and fetches new USGS data every so often, and then rebuilds my middleman sites.

I've got nginx pointing to the middleman build directory at the moment, but in the future, I may move back to pushing the static site out to S3 or something similar.

If I do stick with nginx, it would be nice to figure out how to get nginx to derive variables from the name of the file.

I figure there's got to be some programatic, DRY method to do one config file for several sites; I just haven't found the appropriate documentation yet. Or maybe nginx is just that stripped down and doesn't have an official method of doing what I want to accomplish.

It's not a huge issue if I don't find a solution. I just start feeling icky the more I repeat myself in any computer related endeavor. Which still doesn't stop me from writing horribly redundant code.

I just feel bad about it afterwards.