Single deployable server; content bundled in

I used go.rice recently for a very basic webserver project and really appreciate the ability to package up both the server and the static content easily into the compiled binary; it really makes for an ideal deployment: copy binary, ./binary, done!

Caddy, as is right now, can serve from the directory called in with lots of ioutil.Readfile calls and http.Dir calls, go.rice allows you to discover that same content if it’s on disk (maintain compatibility for how things function now) but can also, depending on configuration, detect the content that’s either been compiled into the app or attached to the app as an aligned zip file that’s just been cated onto the binary.

Would this kind of thing be feasible? Sane? A good/bad idea for Caddy?

Think you can get the same functionality with using zip (e.g. zbundle: bundle code and zip to have one unit of deployment · GitHub), which is more general applicable.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.