Skip to main content

Deploying to a Cluster

Deploying to a Docker Swarm cluster follows the same general workflow as standalone deployments, with additional steps for pushing and pulling images through a container registry.

Prerequisites

Before deploying to a cluster, ensure you have:

  • A cluster set up. A single leader node is enough to start; worker nodes are optional.
  • A container registry configured — required for multi-node clusters. Single-node clusters where the leader is also the build server can deploy registry-less.
  • At least one build server assigned to the cluster. New clusters automatically use the leader, but a standalone build server is recommended for production.

Step-by-Step Deployment

1. Create an Application

  1. Go to the Appliku dashboard and click Create Application
  2. Connect your Git repository (GitHub, GitLab, or custom Git URL)
  3. Select the branch to deploy from
  4. For deployment target, select your cluster (instead of a standalone server)

2. Configure the Application

Set up your application as you would for a standalone deployment:

  • Build settings -- Choose a build image or use a Dockerfile
  • Environment variables -- Add any required configuration
  • Processes -- Define your web, release, worker, and other process types

3. Add a Database (If Needed)

note

Databases can only be deployed on standalone servers, not inside a cluster. Select a standalone server when adding a database. The database connection URL is still injected into your cluster application as an environment variable.

4. Deploy

Trigger a deployment by pushing to your branch or clicking Deploy in the dashboard. The build process depends on whether the cluster uses a registry.

Registry-backed (multi-node clusters, or single-node with registry credentials configured):

  1. Code pull -- The build server clones your repository
  2. Image build -- Docker image is built using your configured build image or Dockerfile
  3. Image push -- The built image is pushed to your configured container registry
  4. Release phase -- If a release process is defined, it runs on the leader node (e.g., database migrations)
  5. Service update -- Docker Swarm pulls the new image on cluster nodes and updates running services
  6. Health check -- Swarm verifies containers are healthy before routing traffic

Local-only (single-node clusters with no registry credentials, leader == build server):

  1. Code pull -- The build server (also the leader) clones your repository
  2. Image build -- Docker image is built and tagged locally as appliku-{app-name}:{deployment-id}
  3. Release phase -- If a release process is defined, it runs on the leader
  4. Service update -- docker stack deploy --resolve-image=never schedules the service against the local image; no push or pull occurs
  5. Health check -- Swarm verifies containers are healthy before routing traffic

See Single-Node Clusters for the full picture, including what happens when you later add a worker node.

5. Set Process Scale

After deploying, configure the number of replicas for each process:

  1. Go to the Processes tab of your application
  2. For each process, click Change Scale
  3. Set the desired number of replicas

Docker Swarm distributes replicas across available nodes automatically. If your cluster has worker nodes, Appliku places generated application services on workers by default. If there are no worker nodes, services can run on the leader.

Build Flow Comparison

StepStandaloneCluster
BuildOn the same serverOn a dedicated build server
Image storageLocal on serverPushed to container registry
DeploymentDocker Compose restartDocker Swarm service update across nodes
ScalingOn/Off per processN replicas per process

Monitoring Deployments

  • Build logs -- Available in the Deployments tab, showing each build step
  • Application logs -- Available from Application Overview > App Logs, select the process/service to view
  • Deployment status -- Tracked as: new, deploying, deployed, failed, timeout, or aborted

Next Steps