Live data from Hacker News

Shrinking my static site

hampton.pw

91–100 of 107 posts

Re: Shrinking my static site

#91
post #69

Earlier quoted context omitted.

> Caddy will keep your site online when other servers don't. Interestingly, the LetsEncrypt incident you mentioned went completely under my radar, none of my traefik instances in production or else were affected at all, or it wasn't caught by my uptimerobot, so I'm really not sure what you were talking about then. Maybe the 2017 incident, but I was still using nginx at the time. Pretty concerning, going to check it o…

> none of my traefik instances in production or else were affected at all It didn't affect every site. But it did affect millions of them. You're lucky!

(Not the one you replied to, but) I was actually affected — but my nginx setup as ingress controller in kubernetes worked just fine, and automatically handled everything. I actually read in the news about it later, but my systems never went down.

And in contrast to caddy, my setup actually follows the DNS and URL standards, and actually handles Absolute URIs correctly, in contrast to e.g. http://caddyserver.com./, which doesn’t even set HSTS on caddyserver.com., while even browsers consider caddyserver.com. the same origin for the purpose of TLS and HSTS.

Re: Shrinking my static site

#92
post #84

Earlier quoted context omitted.

Speaking of complex tooling you don't think Hugo is a bit complex itself? Took Hugo for a test drive using official quick start. Half the themes from official docs wouldn't compile. Started looking into architecture but official docs do not explain the big picture just a bunch of instructions. The official documentation does not explain on what is going behind the scenes very well. I mean, I will obviously want some…

For simple websites you need no "scaffolding", you can just edit the html in a text editor. Really just write the text between the tags. Better to meditate over simplicity and minimalism than to start another software project just to publish a blog.

That's the thing, I've been writing HTML for 25 years and JS for over 20.

Lately I've been writing a lot of .md when writing Jupyter Notebooks.

Thus I figured that Hugo would offer some advantages to relatives who wanted a dead simple site that they wanted to add some posts from time to time.

Static site would be perfect for them but I do not want to manually add their posts...

Started looking into Forestry.io and well it is not quite as simple as Netlify.

Re: Shrinking my static site

#93
post #7

I use Hugo as my static site generator, single binary, no dependencies, generating hundreds of pages in milliseconds ... so reading this feels so wrong, I want to call it JavaScript masochism. Taking a simple concept like a static site and adding a ton of complex tooling around it because it is the trend now? Why would you even need a docker image to run a static website? The best thing about a static website us you…

There is still software powering your static site. That software has to live somewhere or on something. Maybe you upload it to GitLab Pages, then you're relying on the cloud to power your static site. Maybe you upload it to your local server where nginx is running. But something is still running it, and if you're doing it yourself - you can run it in a docker container.

I've taken both routes. I have a static site that uses Hugo to generate - just like you mention. It's distribution pipeline is a Docker container inside of GitLab CI/CD. So that it has all the tools needed to both run hugo and upload to AWS S3.

Other static sites I have are generated into HTML, dumped into a docker container with nginx. Then are pulled on relevant servers which run everything else in docker as well, along with the front end load balancer. It would actually be Significantly more work to NOT have the static site in Docker.

Re: Shrinking my static site

#94
post #7

I use Hugo as my static site generator, single binary, no dependencies, generating hundreds of pages in milliseconds ... so reading this feels so wrong, I want to call it JavaScript masochism. Taking a simple concept like a static site and adding a ton of complex tooling around it because it is the trend now? Why would you even need a docker image to run a static website? The best thing about a static website us you…

There is still software powering your static site. That software has to live somewhere or on something. Maybe you upload it to GitLab Pages, then you're relying on the cloud to power your static site. Maybe you upload it to your local server where nginx is running. But something is still running it, and if you're doing it yourself - you can run it in a docker container. I've taken both routes. I have a static site th…

I kept infrastructure and data separate. Infrastructure I deploy on DO with ansible. nginx up front, letsencrypt auto renew TLS cert etc. Static content I deploy with rsync.

Takes ~3 seconds to deploy a content change by typing “make deploy”

No CI platform. No docker. Much simpler. Much faster. Much cheaper than AWS.

Re: Shrinking my static site

#95
post #92

Earlier quoted context omitted.

For simple websites you need no "scaffolding", you can just edit the html in a text editor. Really just write the text between the tags. Better to meditate over simplicity and minimalism than to start another software project just to publish a blog.

That's the thing, I've been writing HTML for 25 years and JS for over 20. Lately I've been writing a lot of .md when writing Jupyter Notebooks. Thus I figured that Hugo would offer some advantages to relatives who wanted a dead simple site that they wanted to add some posts from time to time. Static site would be perfect for them but I do not want to manually add their posts... Started looking into Forestry.io and we…

Have you looked into Netlify CMS? https://www.netlifycms.org/

Re: Shrinking my static site

#96
post #91
post #69

Earlier quoted context omitted.

> none of my traefik instances in production or else were affected at all It didn't affect every site. But it did affect millions of them. You're lucky!

(Not the one you replied to, but) I was actually affected — but my nginx setup as ingress controller in kubernetes worked just fine, and automatically handled everything. I actually read in the news about it later, but my systems never went down. And in contrast to caddy, my setup actually follows the DNS and URL standards, and actually handles Absolute URIs correctly, in contrast to e.g. http://caddyserver.com./ , w…

Do you have a practical example where that matters? Because I've never seen anyone link to a page with a trailing . in the domain.

Re: Shrinking my static site

#97

Earlier quoted context omitted.

I highly recommend nginx over apache. It's both more performant AND much easier to configure. Other than inertia for an existing deployment I don't think there's any reason to use Apache in 2020.

These days if configured correctly there is not a huge amount of difference in performance between nginx and Apache. I have stayed with Apache because I know it and dealing with a http server is about 0.1% of my job.

Exactly the same for me.

Milliseconds really don't matter for internal tools or legacy or low-use external websites. If someone wants to see our financial report from 2005, I'm sure they're happy to wait the extra 300ms to download it from a static site on the other side of the world. They should be happy that the link to it in the 2006 document they have still works. (The Apache server listens on 4 ports, to support redirecting various 2000s-era CMSs to their replacements.)

We also have some small but important sites using obscure Apache features (semantic web stuff). I have no idea if Nginx supports the necessary configuration, but since I spend 1-2 hours per year dealing with either scenario -- usually to 'archive' another site -- I'm quite happy to use Apache.

Re: Shrinking my static site

#98
post #92

Earlier quoted context omitted.

For simple websites you need no "scaffolding", you can just edit the html in a text editor. Really just write the text between the tags. Better to meditate over simplicity and minimalism than to start another software project just to publish a blog.

That's the thing, I've been writing HTML for 25 years and JS for over 20. Lately I've been writing a lot of .md when writing Jupyter Notebooks. Thus I figured that Hugo would offer some advantages to relatives who wanted a dead simple site that they wanted to add some posts from time to time. Static site would be perfect for them but I do not want to manually add their posts... Started looking into Forestry.io and we…

Ah ok, you started with suggesting Hugo might be a bit complex...

I thought I might have found an ally, someone who has been around for a bit and wary of the cambrian explosion of software projects. Someone who no longer believes in all that software that comes out, with new, cool features that add functionality, but, in my opinion, add subtle difficulty along the way that's hard to account for, death by a thousand cuts that must eventually lead to some kind of fatigue. Things that update and break and change and are deprecated and abandoned and require use of a different language, different build chain, different mental model, just to "add some posts from time to time" to a blog.

Please excuse this little rant. I truly believe that anyone can find their sweet spot with any system. But what is the right fit for your relatives who want it dead simple?

Re: Shrinking my static site

#99
post #74

in my eyes this is all madness. deploying sites via github to some docker shit. how about good old ftp and a cheap shared webhost? like its been done for 30 years.

I've only been doing it for 25 years rather than the full 30 but in my noob opinion I'll take Docker and Github over it every time. The number of times a site failed to update because an FTP file failed to transfer completely, or that the permissions were wrong, or that the FTP client changed a file's CRLFs, or that a directory on the server wasn't writable by the FTP user, or... well, let's just admit that FTP sucke…

When I think of FTP, I'm reminded of chmod'ing 777 until everything worked.
Post reply on HN