dockflow.yml
dockflow.yml is a single-file alternative to the standard .dockflow/ layout. Instead of maintaining separate config.yml and servers.yml files inside a dedicated directory, you place one dockflow.yml at the project root alongside your docker-compose.yml.
This layout is designed for simple projects with a single server. For multi-environment setups, advanced templates, or shared server configs across repos, the standard .dockflow/ layout gives you more control.
Minimal example
# dockflow.yml
project_name: my-app
servers:
main:
host: 1.2.3.4
tags: [production]
defaults:
user: deploy# docker-compose.yml (at project root)
services:
app:
image: my-app
build: .
ports:
- "3000:3000"That’s the entire configuration. No .dockflow/ directory, no subdirectories.
Project layout
my-project/
├── dockflow.yml ← replaces .dockflow/config.yml + .dockflow/servers.yml
├── docker-compose.yml ← replaces .dockflow/docker/docker-compose.yml
├── Dockerfile
└── src/All options
dockflow.yml accepts every field from both config.yml and servers.yml — they share no overlapping keys, so the merge is flat.
From config.yml:
| Field | Type | Description | Default |
|---|---|---|---|
project_name | string | Unique project identifier (DNS-safe, required) | — |
orchestrator | swarm | k3s | Deployment backend | swarm |
container_engine | docker | podman | Build engine (auto-detected if unset) | auto |
registry | object | Docker registry config | — |
options | object | remote_build, image_auto_tag, enable_debug_logs | — |
stack_management | object | keep_releases, cleanup_on_failure | — |
health_checks | object | Endpoint checks, timeouts, on-failure behavior | — |
hooks | object | pre-build, post-build, pre-deploy, post-deploy scripts | — |
lock | object | stale_threshold_minutes | — |
backup | object | Backup config for accessories and services | — |
templates | array | Nunjucks template files to render before deploy | — |
accessories | object | Inline accessory service definitions | — |
proxy | object | Traefik + Let’s Encrypt configuration | — |
notifications | object | Webhook notifications on deploy events | — |
From servers.yml:
| Field | Type | Description | Default |
|---|---|---|---|
servers | object | Server definitions keyed by name (required) | — |
servers.<name>.host | string | Server hostname or IP | — |
servers.<name>.role | manager | worker | Swarm role | manager |
servers.<name>.tags | string[] | Environment tags, e.g. [production] (required) | — |
servers.<name>.user | string | SSH user (overrides defaults.user) | — |
servers.<name>.port | number | SSH port (overrides defaults.port) | — |
servers.<name>.env | object | Server-specific environment variables | — |
defaults.user | string | Default SSH user for all servers | dockflow |
defaults.port | number | Default SSH port for all servers | 22 |
env | object | Environment variables by tag (all, production, etc.) | — |
See Servers & Connections and Project Configuration for full documentation of each field.
How it works
Dockflow detects dockflow.yml
When you run any dockflow command, it traverses up from the current directory looking for dockflow.yml or .dockflow/. If dockflow.yml is found first, the flat layout is activated.
Config and servers are split internally
The file is parsed once and cached. The config fields are routed to the same logic that reads .dockflow/config.yml, and the server fields to the same logic that reads .dockflow/servers.yml. No code in the deploy pipeline changes.
docker-compose.yml is read from the project root
Instead of .dockflow/docker/docker-compose.yml, Dockflow looks for docker-compose.yml (or .yaml) at the project root. Build context paths in the compose file are relative to the project root, which is the standard Docker Compose behavior.
Caveats
If both dockflow.yml and .dockflow/ exist in the same directory, dockflow.yml takes priority.
- Templates: the
templatesfield resolves paths relative to the project root (same as the standard layout). - Accessories: place
accessories.ymlat the project root alongsidedockflow.yml. If not found there, Dockflow falls back to.dockflow/docker/accessories.yml. You can also define accessories inline under theaccessorieskey indockflow.yml. - CI secrets: the
{ENV}_{SERVER}_CONNECTIONformat works identically — host overrides apply regardless of the layout.
Full example
dockflow.yml
# dockflow.yml
project_name: my-app
servers:
web:
host: 1.2.3.4
tags: [production]
defaults:
user: deploy
port: 22
env:
production:
APP_ENV: production
proxy:
enabled: true
email: [email protected]
domains:
production: my-app.example.com
health_checks:
enabled: true
endpoints:
- url: https://my-app.example.com
retries: 5
stack_management:
keep_releases: 3See also
- Project Configuration — all
config.ymlfields in detail - Servers & Connections — all
servers.ymlfields in detail - Docker Compose — compose file structure and Dockflow-specific behavior