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

Project Configuration

The config.yml file defines your project identity, build options, health checks, and deployment behavior. This is the first file to configure in any Dockflow project.

Full Example

# .dockflow/config.yml project_name: "my-app" options: image_auto_tag: true enable_debug_logs: false remote_build: false stack_management: keep_releases: 3 cleanup_on_failure: true lock: stale_threshold_minutes: 30 health_checks: enabled: true startup_delay: 15 on_failure: "rollback" wait_for_internal: true endpoints: - name: "Main Application" url: "http://localhost:{{ app_external_port }}/health" expected_status: 200 timeout: 30 retries: 3

project_name (required)

Unique identifier for your project. Used as the Docker Swarm stack name prefix and release directory name.

Format: lowercase letters, numbers, and hyphens only.

project_name: "my-app"

The stack name is derived as {project_name}-{env}. Releases are stored at:

/var/lib/dockflow/stacks/my-app-production/ 1/ 2/ 3/ current -> 3/

Options

image_auto_tag

Default: true

Appends -{env}:{version} to image names for environment isolation:

  • my-appmy-app-production:1.0.0
  • backend:latestbackend-staging:2.1.0

Set to false to keep image names as defined in docker-compose.yml.

enable_debug_logs

Default: false

Enables verbose logging for debugging deployment issues.

remote_build

Default: false

Build Docker images on the server instead of in the CI/CD pipeline. See Build Strategy for details.

Stack Management

keep_releases

Default: 3

Number of previous releases to retain on the server. Enables quick rollback and automatic cleanup of old releases and images.

cleanup_on_failure

Default: true

Remove Docker images from failed deployments immediately.

Health Checks

Two layers of health verification:

  1. Swarm internal — Docker monitors container healthchecks defined in docker-compose.yml and rolls back automatically on failure.
  2. Dockflow external — HTTP endpoint checks from the host, configured below.

enabled

Default: true

Enable or disable post-deployment health checks.

startup_delay

Default: 15 (seconds)

Time to wait after deployment before running external health checks.

wait_for_internal

Default: true

Wait for Swarm internal healthchecks to pass before running external checks.

on_failure

Action when external health checks fail:

ValueBehavior
"fail"Mark deployment as failed
"rollback"Rollback to the previous stack
"notify"Log a warning but continue
"ignore"Skip health check failures

endpoints

List of HTTP endpoints to check after deployment:

endpoints: - name: "API" url: "http://localhost:3000/health" expected_status: 200 timeout: 30 retries: 3
FieldDescription
nameDescriptive label
urlURL to check (supports Jinja2: {{ app_external_port }})
expected_statusExpected HTTP status code
timeoutRequest timeout in seconds
retriesNumber of retry attempts

Deploy Lock

stale_threshold_minutes

Default: 30

Dockflow prevents concurrent deployments to the same stack. Lock files are stored in /var/lib/dockflow/locks/ and expire after this threshold. Accepts values from 1 to 1440 (24 hours).

Audit Log

Every deployment is recorded at /var/lib/dockflow/audit/{stack-name}.log:

2024-01-15T10:30:00Z | DEPLOYED | 1.0.0 | user@ci-runner | success 2024-01-16T14:20:00Z | DEPLOYED | 1.0.1 | user@ci-runner | success

Next: Servers & Connections — define your servers, environment variables, and CI secrets.