Simple Musings

New Blog

2021 Update: This setup didn't pan out. Hugo turned out to be too frustrating to work with and the latest App Engine changes continue to be more and more disappointing. This is my new setup.

I decided to start writing again and so I picked up the latest in static site generation, Hugo, and deployed it all on my favoritest hosting option, Google App Engine.

Running the site this way is almost straightforward. The only tricky thing is getting the rules right for serving the static files. I’ve been running a static site on App Engine for a while now, but I figured it would be good to take another look at the config to make sure I’m using it well. I found this blog entry on running a static site on Google App Engine and that helped me confirm rules I needed. It also has some good tips on setting up 301 redirects (though I usually just delete my old stuff on refresh) and SSL (something that I didn’t know was super easy to do on App Engine). When I get some time (and can clean up the process more) I’ll write an entry about it.

Update: I had to make an adjustment just before publishing. It turns out I wasn’t able to use the skip_files part of the configuration from the article linked above. It looks like that’s a holdover from the older App Engine instances. The new way is to use a .gcloudignore file which is documented here.

What I’m Looking At Now

The newest thing that’s caught my attention is Google Cloud Run. From what I’ve read/heard so far it’s basically “run your container in the cloud”. That might not sound spectacular but it’s got one killer feature that first made me love App Engine - it scales down to zero automatically. If you’ve got eight minutes I’d recommend checking out this video by Fireship which not only demos Cloud Run but also hooking it up to a Firebase hosted site.

At this point you might assume (if you don’t know me) that I’m a Google fan boy. That wouldn’t be accurate, but I can see the cause of the confusion. My real affinity is for App Engine. I can explain why but we have to go back a bit.

Back when App Engine was first released I was just starting to get into Python. I really liked it’s expressiveness and I really wanted to use it more often for web development. There was a problem though - hosting. Hosting options weren’t great for small pet projects, especially if you were cash strapped like I was. But then the heavens opened and App Engine was released.

App Engine had a number of great features. One was that it had a free quota (woo!). The second was that it would shut itself down when no requests were coming to it, effectively stretching your free quota even further (woohoo!!). It was great for someone trying to stretch their dollar further. And this is still true today, App Engine (standard at least) still offers the free quota and automatic scaling. (Are you taking notes Amazon?)

There is a downside to running on App Engine (standard) though and one of those downsides is that you are restricted in your choice of language. I’m a polygot developer so the restriction didn’t bother me much but I can appreciate it being a stumbling block for others, especially if you have a rigid organization. Cloud Run though opens up that App Engine automatic scaling to everyone and that sounds really cool. Feel like writing that new micro service in Erlang? Go for it. Lua? Sure. Want to put Openoffice in a container so you can convert docs to pdf? There’s a demo for that, per the Google Cloud podcast. The prospects of how people could use this are exciting. As soon as I get a chance to look into this, I plan to.

Unless something else distracts me first. (It’s very possible.)