Live data from Hacker News

A tiny Docker image to serve static websites

lipanski.com

21–30 of 156 posts

Re: A tiny Docker image to serve static websites

#22
post #16

Earlier quoted context omitted.

In terms of CPU cycles and disk space, maybe. In terms of engineer cycles, absolutely not. Which costs more?

Hmm, a SCP shell script on my laptop, prompting my SSH key's password and deploying the site to the target machine? Or a constantly-updating behemoth, running as root, installing packages from yet another unauditable repository chain?

You forgot the step where you had to provision that server to run the software and maintain all the systems security updates on the live running server, and that server requires all the same maintenance, with or without docker. And if you fuck it up, better call the wife and cancell Sunday plans because you forgot how it all gets installed and ......yeah, just use docker :p

Re: A tiny Docker image to serve static websites

#23
For static websites, is there any reason not to host them on GitHub?

Since GitHub Pages lets you attach a custom domain, it seems like the perfect choice.

I would expect their CDN to be pretty awesome. And updating the website with a simple git push seems convenient.

Re: A tiny Docker image to serve static websites

#25
post #23

For static websites, is there any reason not to host them on GitHub? Since GitHub Pages lets you attach a custom domain, it seems like the perfect choice. I would expect their CDN to be pretty awesome. And updating the website with a simple git push seems convenient.

Can you do SSL?

Re: A tiny Docker image to serve static websites

#26

But why would you prefer Docker like this over, for example, running thttpd directly? Saves you a lot of Ram an indirection?

For one, because his home server provides multiple utilities, not just this one project, and without docker he starts to have dependency conflicts.

He also like to upgrade that server close to edge, and if that goes south, he want to rebuild and bring his static site up quickly, along with his other projects.

Re: A tiny Docker image to serve static websites

#27
post #23

For static websites, is there any reason not to host them on GitHub? Since GitHub Pages lets you attach a custom domain, it seems like the perfect choice. I would expect their CDN to be pretty awesome. And updating the website with a simple git push seems convenient.

Can you do SSL?

Yes, since 2018.

Re: A tiny Docker image to serve static websites

#28
post #23

For static websites, is there any reason not to host them on GitHub? Since GitHub Pages lets you attach a custom domain, it seems like the perfect choice. I would expect their CDN to be pretty awesome. And updating the website with a simple git push seems convenient.

I don't think you can set a page or URL on github to return a 301 moved permanently response or similar 3xx codes. This can really mess up your SEO if you have a popular page and try to move off github, you'll basically lose all the clout on the URL and have to start fresh. It might not matter for stuff you're just tossing out there but is definitely something to consider if you're putting a blog, public facing site, etc. there.

Re: A tiny Docker image to serve static websites

#29
post #16

Earlier quoted context omitted.

Hmm, a SCP shell script on my laptop, prompting my SSH key's password and deploying the site to the target machine? Or a constantly-updating behemoth, running as root, installing packages from yet another unauditable repository chain?

You forgot the step where you had to provision that server to run the software and maintain all the systems security updates on the live running server, and that server requires all the same maintenance, with or without docker. And if you fuck it up, better call the wife and cancell Sunday plans because you forgot how it all gets installed and ......yeah, just use docker :p

Debian offers unattended upgrades: https://wiki.debian.org/UnattendedUpgrades

And security updates, as you said, are needed regardless of whether you run Docker on top. I think Docker is a needless complexity and security risk.

Re: A tiny Docker image to serve static websites

#30
post #23

For static websites, is there any reason not to host them on GitHub? Since GitHub Pages lets you attach a custom domain, it seems like the perfect choice. I would expect their CDN to be pretty awesome. And updating the website with a simple git push seems convenient.

I'm sure their CDN is great, and I've used it in the past; however, I like to self-host as a hobby.
Post reply on HN