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.
A tiny Docker image to serve static websites
31–40 of 156 posts
Re: A tiny Docker image to serve static websites
#32Re: A tiny Docker image to serve static websites
#33For 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,…
$ curl https://nobodywasishere.github.io # moved to https://blog.eowyn.net
301 Moved Permanently
301 Moved Permanently
nginx
$ curl https://blog.eowyn.net/vhdlref-jtd # moved to https://blog.eowyn.net/vhdlref
301 Moved Permanently
301 Moved Permanently
nginx
Re: A tiny Docker image to serve static websites
#34Earlier quoted context omitted.
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
#35Earlier quoted context omitted.
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,…
I have a few 301 redirects setup on github pages $ curl https://nobodywasishere.github.io # moved to https://blog.eowyn.net 301 Moved Permanently 301 Moved Permanently nginx $ curl https://blog.eowyn.net/vhdlref-jtd # moved to https://blog.eowyn.net/vhdlref 301 Moved Permanently 301 Moved Permanently nginx
Re: A tiny Docker image to serve static websites
#36For 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
#37Re: A tiny Docker image to serve static websites
#38Earlier quoted context omitted.
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.
And you're welcome to think so, but if you intend to make a case for removing Docker as optimization, you still have yet to start.
Relying on hidden complexity makes for a hard path ahead. You become bound by Docker's decisions to change in the future.
For example, SSLPing's reliance on a lot of complex software (among which NodeJS and Docker) got it to close, and it got on the front page of HN recently.
https://news.ycombinator.com/item?id=30985514
Keeping dependencies to a minimum will extend the useful lifespan of your software.
Re: A tiny Docker image to serve static websites
#39Earlier quoted context omitted.
I have a few 301 redirects setup on github pages $ curl https://nobodywasishere.github.io # moved to https://blog.eowyn.net 301 Moved Permanently 301 Moved Permanently nginx $ curl https://blog.eowyn.net/vhdlref-jtd # moved to https://blog.eowyn.net/vhdlref 301 Moved Permanently 301 Moved Permanently nginx
Is that coming back with a HTTP 200 response though and the made up HTML page? That doesn't seem right... at least, I dunno if google and such would actually index your page at the new URL vs. just thinking "huh weird looks like blog.eowyn.net is now called '301 Moved Permanently', better trash that down in the rankings".
Re: A tiny Docker image to serve static websites
#40Earlier quoted context omitted.
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,…
I have a few 301 redirects setup on github pages $ curl https://nobodywasishere.github.io # moved to https://blog.eowyn.net 301 Moved Permanently 301 Moved Permanently nginx $ curl https://blog.eowyn.net/vhdlref-jtd # moved to https://blog.eowyn.net/vhdlref 301 Moved Permanently 301 Moved Permanently nginx
A 301 (or 302) redirect means setting the status code header to 301 and providing a location header with the place to redirect to. Last I checked GitHub doesn't allow any of this, or setting any other headers (like cache-control). To work around this, I've been putting cloudflare in front of my site which lets me use page rules to set redirects if necessary.