Live data from Hacker News

Jekyll Static Web Hosting – Deployment Pipeline on AWS

zoph.me

51–60 of 67 posts

Re: Jekyll Static Web Hosting – Deployment Pipeline on AWS

#51
post #39

Can someone help explain to me the appeal of static site generators? Functionally it's still a dynamically generated site, just that cache population/invalidation has turned into a user-controlled manual step. Is this because of people wanting to host on static-asset only servers (GitHub Pages, S3 Website, etc) or is there some other benefit above simply using any standard blogging software? If it's a question of spe…

There are quite a few reasons, if we compare 'self-hosted' setups.

It's simpler on the server as you say, you can serve the files from pretty much anywhere. You also need less resources to do so. I appreciate the cache idea, used to do it myself with wordpress, still do with MyBB, but it's imperfect and there are always misses, espceially if someone is actively cache busting you to DOS your site.

Much less hassle to setup. If you're going to do it 'properly' you're going to want to set up your dynamic site to run in a chroot jail, run the php process under a unique user per site (especially with nginx), setup unique database users and databases per site, secure your credentials, have a version control setup and update functionality and on and on. There's a lot to do. You can automate it (I have) but it's still annoying and requires monitoring.

You can move almost anywhere almost instantly, with just a git push/rsync and a DNS change.

Hugely reduced attack surface. It's literally a collection of text files.

The benefits are somewhat reduced if you get someone else to manage your hosting for you, but it remains simpler to move and usually cheaper to host as you need no database service.

Re: Jekyll Static Web Hosting – Deployment Pipeline on AWS

#52

Earlier quoted context omitted.

I also use hugo. In my setup, though, I have everything in one git repo - config files, content files, theme, output, etc. Nginx exposes its output directory. I stopped using Caddy when I discovered that it didn't support one of the unusual TLDs I had. Maybe I should give it another go, though. That was over a year ago.

What do you mean it didn't support a TLD? It's a server, how does it need to "support" TLDs? In my experience, you just specify the hostname and it works.

I'm not sure. All I know is that when I had a domain name in there ending in ".space," the server ignored that config and served everything else.

I assumed it was because of the TLD, because everything else was otherwise identical to some of the other virtualhosts.

Re: Jekyll Static Web Hosting – Deployment Pipeline on AWS

#53

Earlier quoted context omitted.

What do you mean it didn't support a TLD? It's a server, how does it need to "support" TLDs? In my experience, you just specify the hostname and it works.

I'm not sure. All I know is that when I had a domain name in there ending in ".space," the server ignored that config and served everything else. I assumed it was because of the TLD, because everything else was otherwise identical to some of the other virtualhosts.

Huh, that's really odd. I wonder if it's a regex gone wrong.

Re: Jekyll Static Web Hosting – Deployment Pipeline on AWS

#54
post #2

After I discovered Netlify, I'm kind of thinking "why bother". It's free, I just push to my repo and they take care of all the building/publishing/hosting/CDNs, and they're very responsive for support and have high availability. I'm a very happy customer (or rather leech, as I don't pay anything).

Netlify is fantastic. It works great. I'm usig it git GitLab and it's a pleasure.

Please know that GitLab also comes with GitLab Pages. That being said if you're comfortable using a SaaS service Netlify does have a smoother user experience.

Re: Jekyll Static Web Hosting – Deployment Pipeline on AWS

#55

What a nightmare. I'm sure there are use cases for a setup like this, but this is not the system I'd like to maintain. I use Jekyll because of it's simplicity. I edit my site in my favorite text editor and rsync to shared hosting.

I use a very similar system for static sites that I maintain. I edit my site in my favorite text editor and run 'git push'. :)

It was a bit of work to get everything running, but there's very little to actually maintain afterward. I'm definitely going to start replicating the setup elsewhere (including my own homepage, which is currently down due to its VPS having failed hard and me not having enough time to rebuild it).

Re: Jekyll Static Web Hosting – Deployment Pipeline on AWS

#56
post #39

Can someone help explain to me the appeal of static site generators? Functionally it's still a dynamically generated site, just that cache population/invalidation has turned into a user-controlled manual step. Is this because of people wanting to host on static-asset only servers (GitHub Pages, S3 Website, etc) or is there some other benefit above simply using any standard blogging software? If it's a question of spe…

There are quite a few reasons, if we compare 'self-hosted' setups. It's simpler on the server as you say, you can serve the files from pretty much anywhere. You also need less resources to do so. I appreciate the cache idea, used to do it myself with wordpress, still do with MyBB, but it's imperfect and there are always misses, espceially if someone is actively cache busting you to DOS your site. Much less hassle to…

In terms of cache busting comment, that's purely a configuration thing. You'd just make your cache objects never expire and fully warm the cache yourself (again, via some sort of plugin). WP itself wouldn't exist to the client it'd literally be a static site.

Anyway, that aside: So it's literally just the desire to have a zero-footprint blog. I can appreciate that notion but I'm surprised this trend came about with brand new tools as opposed to just packaging up the output of existing blog generators.

Sounds like you should build a WP plugin that generates a static/exportable site. You know the space and clearly understand the market dynamics.

Re: Jekyll Static Web Hosting – Deployment Pipeline on AWS

#58
post #56

Earlier quoted context omitted.

There are quite a few reasons, if we compare 'self-hosted' setups. It's simpler on the server as you say, you can serve the files from pretty much anywhere. You also need less resources to do so. I appreciate the cache idea, used to do it myself with wordpress, still do with MyBB, but it's imperfect and there are always misses, espceially if someone is actively cache busting you to DOS your site. Much less hassle to…

In terms of cache busting comment, that's purely a configuration thing. You'd just make your cache objects never expire and fully warm the cache yourself (again, via some sort of plugin). WP itself wouldn't exist to the client it'd literally be a static site. Anyway, that aside: So it's literally just the desire to have a zero-footprint blog. I can appreciate that notion but I'm surprised this trend came about with b…

> In terms of cache busting comment, that's purely a configuration thing

As long as you don't have functionality that relys on it though, like search. I've seen that used to DOS a site before. And pingbacks. Sometimes even comments (though to be fair, you can turn those off for parity with a static site).

Plus you'd probably want to do the caching up a layer and not rely on a plugin, maybe a varnish cache or Fast-CGI cache which adds complexity and cache invalidation etc etc. W3TC and ilk are good, but to get the most from them you need to have good control over the server environment, especially for object store, and you probably want to integrate them with varnish server or something anyway. And before that even just for running the site you'll need to tune php and mysql. Not to mention 'fully' warming the cache on a large dynamic site can take quite a while, if it can be done at all.

Something like Hugo can output thousands of pages in milliseconds. That kind of performance just can't be found in a dynamic site, so warming the cache will always take longer than generating a static site like that.

I guess there's just more to be aware of.

> So it's literally just the desire to have a zero-footprint blog.

I don't disagree but I'd say it probably goes further than that. It's just so simple to go static. If you really dig into hosting a dynamic site there is a lot to do to make it work well under most conditions.

> Sounds like you should build a WP plugin that generates a static/exportable site.

There are actually a few good ones out there. I just used on to archive a site. Wget was flaking out with converting srcset urls (even when I compiled the 1.19 branch which was supposed to fix it) so I used a plugin to export the site.

Overall, I don't really promote one over the other, they're tools at the end of the day and if one works for a workflow then it's the best!

Re: Jekyll Static Web Hosting – Deployment Pipeline on AWS

#59
post #2

After I discovered Netlify, I'm kind of thinking "why bother". It's free, I just push to my repo and they take care of all the building/publishing/hosting/CDNs, and they're very responsive for support and have high availability. I'm a very happy customer (or rather leech, as I don't pay anything).

I am a recent convert to Netlify and I love it. A++. I have never had SSL on my personal website because doing so is such a hassle; not only does everything Just Work, but getting that set up was trivial.

I have a shell script in my Jekyll code that does an s3 sync and invalidates the Cloudfront stuff. Why do the extra step with a Lambda script that also needs maintained?

Re: Jekyll Static Web Hosting – Deployment Pipeline on AWS

#60
post #39

Can someone help explain to me the appeal of static site generators? Functionally it's still a dynamically generated site, just that cache population/invalidation has turned into a user-controlled manual step. Is this because of people wanting to host on static-asset only servers (GitHub Pages, S3 Website, etc) or is there some other benefit above simply using any standard blogging software? If it's a question of spe…

Version control matters, too. Ever seen a whole bunch of Wordpress content lost forever due to some sort of site failure? I have. Editors matter. I'd rather use a good professional editor like Sublime for large-scale writing, than some wonky web page thing.

Web sites are software products. If you think like a coder, you want to run them like a coder. If I were just a writer, I'd probably think very differently.

Post reply on HN