Web Apps

For simplicity sake my default way of publishing was with static sites on either GitLab Pages or GitHub Pages. But for deploying web apps I just didn’t have a nice way.

There were unsuccessful attempts with serverless Cloud providers, that charge by the CPU second, but that means I don’t get to have any application state, because the instances are short-lived. And the deployment itself was always fiddly and couldn’t be relied on.

I had stumbled on Coolify earlier before and had wanted to give it a try. But when I found out you can have Hetzner pre-install one when configuring a shared server with them, there was just no reason not to try.

Setup took a few minutes, and now all I have to do is to add a tiny Dockerfile to a Kotlin repo, the usual: pull temurin, build the app, run the jar, expose port 8080 and set up a new App in Coolify. Add a domain name and optionally a Webhook that triggers a rebuild when the code changes, and off we go.

Coolify makes this feel outright casual and effortless. Need a database side-car along with it? Coolify has you covered. Custom config for the reverse proxy? Easily done.

Static Site Hosting

After having migrated from Neocities to GitLab Pages, I had (somewhat jokingly) mused on self-hosting again. And since it worked so well with the custom web apps, I had to try it with a static site.

And with some help from Claude this now runs on my own host. The SSL score is atrocious1 and I am not fully happy with the setup, but at least it is mine. Instead of using the static site deploy type, I built a bespoke Docker container with nginx.

The convoluted GitLab Pipeline process with multiple containers and interwoven includes is now handled by a small multi-step Dockerfile that contains a total of 19 lines of code for building, deploying and running everything!

Batteries-included Apps

It even comes with pre-configured apps. You can spin up a complete PocketID instance in a few seconds, ready to go.

I always wanted to try AppWrite or Supabase for small personal projects. Now I can deploy one with a few clicks, play around and tear it down with as few clicks again.

Downsides

Coolify is written in PHP. I’d much prefer something written in a more robust language, but it works.

It does work with arbitrary Git Servers, like Gitea, but takes some coercion and finagling to get it working, while it is clearly designed to be used with the GitHub integration that comes with it.

Note: Gitea doesn’t (yet) have a dedicated Coolify target for WebHooks but will work when selecting “Gitea” as target.

ALL the different http apps are in use. Coolify uses Caddy as frontend, Traefik as backend and the Docker Images usually have their own Webserver or Reverse Proxy in it. It works but that is more moving pieces than I would have liked my setup to have. If any one of those has a security vulnerability the entire stack is open to attack.

  1. Has been fixed since, using a custom Reverse Proxy middleware config.