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'd probably choose the sftp and webhost route myself, but you know.
81–90 of 107 posts
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'd probably choose the sftp and webhost route myself, but you know.
Earlier quoted context omitted.
Could you elaborate on that statement, why should static site and docker not be seen together?
It depends what you’re optimizing for. One of the beautiful things about a static site is it’s ability to be served by object stores like S3 as your origin, and cached by a CDN. From an operations standpoint, you are not responsible for maintaining much of anything, the performance is super fast, highly available, and relatively cheap (no dedicated servers, just paying for bandwidth and storage costs) Contrast that w…
When you manually do these things, you rely on a bunch of implicit defaults. Maybe your production server and your workstation happen to have the same version of nginx, and happen to set the same defaults. So you can test a change on your workstation and the same change works in production. But more likely, that is not the case. So you get weird differences between development and production, and you only notice when you push to production. That is not ideal. Building an image with your webserver and static files ensures that you see the same things in both places. There is no need to test anything in production, as you have a copy of the exact code and data that is going to be running in production, locally. You can tweak and poke to your heart's content, confident that you'll have the same effect when you push to production. There is no need to maintain documentation about how to build your project and what versions of things you use; you specify them in a machine-readable format and the machine dutifully builds the project correctly every single time.
(One disadvantage of clean builds, though, is that sometimes you want old artifacts to exist. Consider a case where you use webpack to generate javascript. Typically, you'll output a bundle like "main.abc123.js" which is loaded from "index.html" via a script tag. What happens when the browser loads index.html from your last build, then you the next request goes to an updated server, which says to get "main.def456.js" instead? The page silently breaks, because the server doesn't have a file called "main.def456.js" anymore. "rsync --delete" has the same problem. And if you never delete anything, you eventually use an infinite amount of disk space. So there is definitely room for improvement here, but "it will probably work if I don't think about it and cross my fingers" is not the improvement we're looking for.)
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…
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…
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 sort of scaffolding and a way of changing it but this https://gohugo.io/getting-started/directory-structure/ is not helping very much.
Since you are not supposed to write go code everything has to be done through .toml config files as far as I could grok.
I feel I'd rather write my own static generator in language of my choice(say Python) than keep up with the Hugo docs.
I'd suggest changing this: COPY package.json . RUN npm install to this: COPY package.json package-lock.json . RUN npm ci `npm ci` installs the exact dependencies specified in the lockfile. This way, transitive dependencies that were upgraded via `npm audit fix` are guaranteed to be installed. It therefore forces the image to be rebuilt when a transitive dependency changes. Copying only the package.json wouldn't do th…
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…
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…
Earlier quoted context omitted.
Possibly this is far too old fashioned, but all our internal static sites (and a good few external static sites) I deploy to a single Apache server.
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.
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…
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…