Configuration

Dockward reads a single JSON config file at startup. The default path is /etc/dockward/config.json; override with -config <path>.

For the complete field reference including all defaults and validation rules, see Config Reference.

Minimal — Heal-Only Mode

Monitor a standalone container by name and restart it when unhealthy:

{
  "services": [
    {
      "name": "my-api",
      "container_name": "my-api",
      "auto_heal": true,
      "heal_cooldown": 120,
      "heal_max_restarts": 5
    }
  ]
}

No registry, compose files, or compose project required. See Heal-Only Mode Guide for behavior details.

Full Mode — Registry + Compose

Poll a local registry, auto-deploy on image change, and auto-heal:

{
  "registry": {
    "url": "http://localhost:5000",
    "poll_interval": 300
  },
  "monitor": {
    "stats_interval": 30
  },
  "api": {
    "port": "9090"
  },
  "services": [
    {
      "name": "myapp",
      "images": ["myapp:latest"],
      "compose_files": [
        "/srv/myapp/docker-compose.yml"
      ],
      "compose_project": "myapp",
      "auto_update": true,
      "auto_heal": true,
      "health_grace": 60,
      "heal_cooldown": 300,
      "heal_max_restarts": 3
    }
  ]
}

See Full Mode Guide for deploy and rollback behavior.

Multiple Compose Files

Pass multiple files to compose_files to simulate docker compose -f base.yml -f override.yml:

{
  "services": [
    {
      "name": "myapp",
      "images": ["myapp:latest"],
      "compose_files": [
        "/srv/myapp/docker-compose.yml",
        "/srv/myapp/docker-compose.override.yml"
      ],
      "compose_project": "myapp",
      "auto_update": true,
      "auto_heal": true,
      "health_grace": 60,
      "heal_cooldown": 300
    }
  ]
}

Mixed Services

A single config can mix full-mode and heal-only services:

{
  "registry": {
    "url": "http://localhost:5000",
    "poll_interval": 300
  },
  "notifications": {
    "discord": {
      "webhook_url": "https://discord.com/api/webhooks/ID/TOKEN"
    }
  },
  "services": [
    {
      "name": "myapp",
      "images": ["myapp:latest"],
      "compose_files": ["/srv/myapp/docker-compose.yml"],
      "compose_project": "myapp",
      "auto_update": true,
      "auto_heal": true,
      "health_grace": 60,
      "heal_cooldown": 300
    },
    {
      "name": "proxy",
      "compose_files": ["/srv/proxy/docker-compose.yml"],
      "compose_project": "proxy",
      "auto_update": false,
      "auto_heal": true,
      "heal_cooldown": 300
    },
    {
      "name": "standalone-api",
      "container_name": "standalone-api",
      "auto_heal": true,
      "heal_cooldown": 120,
      "heal_max_restarts": 5
    }
  ]
}

Notifications

For notification configuration see Notifications Reference.