Build and deployment model
Coolify turns source code, Docker configuration, or an existing image into running containers on a connected server.
The exact path depends on whether Coolify builds an image, pulls one from a registry, or applies a Docker Compose definition. Coolify coordinates the deployment while Docker builds and runs the workload on your infrastructure.
This page focuses on applications. Databases and one-click services use their own Docker lifecycle and do not follow every build path described here.
What starts a deployment
An application deployment combines configuration saved in Coolify with a trigger such as Deploy, Redeploy, a Git webhook, or an API request.
The application source determines whether a build is required before Coolify can start containers.
From configuration to running containers
Coolify follows the same broad lifecycle even when the source and replacement paths differ.
How Coolify prepares an image
Every application container starts from a Docker image. Coolify can create that image from application source or use an image that already exists in a registry.
For Git deployments that use Nixpacks, Railpack, Static, or Dockerfile, Coolify looks for an image tagged with the requested commit. If the image exists locally or in the configured registry and no build configuration changed, Coolify skips the build and reuses that image.
Use Force deploy (without cache) when you need Coolify to rebuild the image without Docker's build cache.
A dedicated build server separates build load from the deployment server. Using a build server requires a registry image name so the deployment server can pull the completed image. Read Build Server for the server and registry requirements.
How Coolify replaces running containers
For source-based applications, Coolify completes the image build before changing the running containers. A failed source build leaves the current application version running.
After the build finishes, or after Coolify prepares the existing image reference and runtime configuration, the replacement behavior depends on the application type and configuration.
Configure a health check when a rolling update must verify that the new container is ready. Without a configured or image-provided health check, Coolify cannot test application readiness before treating the new container as available.
Open Deployments on the application to inspect each deployment status and its logs. After the application is running, use Logs, Terminal on non-Swarm servers, and the application lifecycle actions to operate the containers.
What persists between deployments
Containers are replaceable. Persistent data must live outside the container's writable filesystem so a new container can use the same data.
- Build-time configuration affects the image and can require a new build.
- Runtime configuration is applied when the container starts, so Coolify can reuse the same image when only runtime settings change.
- Persistent volumes and mounted files remain outside the replaceable container filesystem and are attached to the new container definition.
- Unmounted container data is not persistent and can be lost when Coolify replaces or removes the container.
Read Docker and containers for the relationship between images, containers, volumes, and networks.
