Closed toelke closed 2 years ago
- I like that you have split the work in two different containers (stages), one for building and one for serving; perhaps this could be taken one step further: one for building the executables (that could be reused in later stages), one for bundling the site archive, and finally one for serving the bundle;
That is exactly what I did :-D
I will address the rest of the suggestions in commits.
I have taken your two commits, rebased squashed them into a single commit: https://github.com/volution/kawipiko/commit/c35f156e08312bacbf1ada82906d63df36cdf38d
Thanks!
(I've retained your authorship, but GitHub seems to not know that the email you are using to commit belongs to your account; I think you can solve this by adding your email in your GitHub profile page at https://github.com/settings/emails.)
On the subject of containers, I think I'll rework it a bit, perhaps preparing different containers for different use-cases.
First of all thanks for the interest and the first pull request!
I've looked over the
dockerfile
and I have a few comments (perhaps I'll merge this as is, I'll have to think about this):I like that you have split the work in two different containers (stages), one for building and one for serving; perhaps this could be taken one step further: one for building the executables (that could be reused in later stages), one for bundling the site archive, and finally one for serving the bundle;
the
wrapper
build is unneeded because it contains both thearchiver
andserver
in the same executable;the
server
could just run on port8080
, thus not requiring the userroot
; (then the operator could map that port to80
inside the host if he wants;)the
server
arguments (by default) should perhaps not include--debug
(i.e. print one line for every request); instead it could use--report
that prints a summary once-in-a-while;the
server
--archive-preload
argument is perhaps not needed in a container environment; (that flag instructs the server to read the whole archive to make it "fresh" in the OS file-system cache;)Outside of this it looks OK as a first example on how Kawipiko might be used in a container setting.