Skip to Content
⚠️ Dockflow is currently under development. Bugs may occur. Please report any issues on GitHub.
ConfigurationOrchestrator

Orchestrator

Selects the orchestration backend used for deployments. Dockflow supports Docker Swarm (default) and k3s (lightweight Kubernetes) as deployment targets — same config, same commands, different runtime.

Minimal Configuration

# .dockflow/config.yml orchestrator: k3s

That’s it. All Dockflow commands (deploy, logs, scale, rollback, setup) adapt automatically to the selected backend.

When omitted, orchestrator defaults to swarm. Existing projects continue to work without any changes.

All Options

FieldTypeDescriptionDefault
orchestrator"swarm" | "k3s"Orchestration backend for deployments"swarm"

swarm (Docker Swarm)

  • Uses docker stack deploy and Docker Swarm services
  • Traefik deployed as a Swarm service with overlay networking
  • Requires Docker installed on all nodes (dockflow setup handles this)

k3s (Lightweight Kubernetes)

  • Uses kubectl apply with auto-generated Kubernetes manifests
  • Traefik is embedded in k3s — no separate deployment needed
  • Compose files are automatically converted to Kubernetes Deployments, Services, and IngressRoutes

How It Works

Provisioning

Run dockflow setup swarm <env> or dockflow setup k3s <env> depending on your chosen backend. For Swarm, this installs Docker and initializes the cluster. For k3s, it installs k3s on the manager and joins workers via the node token.

Deployment

dockflow deploy <env> reads the orchestrator field from your config. For Swarm, it deploys using docker stack deploy. For k3s, it converts your docker-compose.yml into Kubernetes manifests (Deployments, Services, PVCs) and applies them with kubectl apply.

Traefik auto-configuration

Both backends support automatic HTTPS via Traefik when proxy.enabled: true. For Swarm, Traefik is deployed as a service. For k3s, Dockflow configures the built-in Traefik instance via HelmChartConfig — Let’s Encrypt certificates work identically in both cases.

k3s Prerequisites

  • RAM: minimum 512 MB per node (1 GB recommended)
  • Ports: 6443 (API server), 10250 (Kubelet), 8472/UDP (Flannel VXLAN)
  • OS: Any Linux distribution supported by k3s (Debian, Ubuntu, RHEL, etc.)

k3s adds ~50–100 MB of baseline RAM usage compared to Docker Swarm. On memory-constrained nodes (512 MB), this leaves less headroom for your application containers.

Compose Compatibility

Your existing docker-compose.yml works as-is with both backends. Dockflow handles the translation:

Compose conceptSwarmk3s
ServicesSwarm servicesKubernetes Deployments + ClusterIP Services
Named volumesDocker volumesPersistentVolumeClaims
Bind mountsBind mountshostPath volumes
deploy.replicasSwarm replicasspec.replicas
deploy.placementSwarm constraintsnodeSelector
Traefik labelsSwarm labelsIngressRoute CRDs
PortsPublished portsClusterIP service ports
healthcheckNative Docker health checkslivenessProbe + readinessProbe

Example

# .dockflow/config.yml project_name: "my-app" # orchestrator: swarm (default, can be omitted) proxy: enabled: true email: [email protected] domains: production: my-app.example.com

Both configurations use the same docker-compose.yml and servers.yml — the only difference is the orchestrator field.