← all posts

How a deploy actually works here

Push to the default branch of gama.ir1/support/testblog. A GitLab project webhook notifies Coolify, which starts a build immediately — no button, no API call. This very sentence arrived that way.

Coolify builds the Dockerfile in this repo. It is a two-stage build: the first stage installs dependencies and runs nuxt build, the second copies only the .output directory into a clean Node image. The runtime image carries no node_modules and no source.

The new container starts and is health-checked before the old one is retired, so a rebuild does not take the site down.

Traefik picks up the container’s labels and routes the configured domain to port 3000 inside it, terminating TLS with a certificate it obtained over HTTP-01.