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 with at least a leader node and one worker node
  • A container registry configured with valid credentials
  • At least one build server assigned to the cluster (recommended: a standalone server, not a cluster node)

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 works as follows:

  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

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 worker nodes automatically.

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