What would it take to set up a local VPS to host static websites with separate deployable functions (cloud functions/lambdas)?

If our needs are never that crazy, we won’t scale infititely, we don’t want to. But we want a nice experience? Could we build something like this relatively easily?

Here’s the start of and outline for some of the stuff we might need.

VPS providers

https://terrahost.no/virtuell-server

Stack

Web server

Caddy web server on GitHub (single binary, 0 dependencies, deals with automatic https redirects, automatic certification issuing and renewal through certmagic)

See Caddy web server

Redirects

https://github.com/samvaughton/caddy-netlify-redirects

DNS

Cloudflare? See https://support.cloudflare.com/hc/en-us/articles/360019093151-Managing-DNS-records-in-Cloudflare

And they support ALIAS-like records using something called ‘CNAME flattening’. See https://blog.cloudflare.com/introducing-cname-flattening-rfc-compliant-cnames-at-a-domains-root/

Functions

faasd (OpenFaaS without Kubernetes)

References

See Alternative digital infrastructures

https://www.digitalocean.com/blog/deploying-a-fully-automated-git-based-static-website-in-under-5-minutes/?