Skip to content

feat: add sync pull/diff/push commands for infrastructure-as-code workflow #22

@iamtoled

Description

@iamtoled

Problem

Dokploy currently has no infrastructure-as-code story. There's no way to:

  • Snapshot server state to version-controlled files
  • Track configuration drift between environments
  • Apply changes from local files back to the server

Proposed Solution

Add three new commands under dokploy sync:

  • sync pull - Serialize full Dokploy state (projects, environments, apps, compose, databases) to local YAML files
  • sync diff - Compare local YAML state against the live server with colored field-level output
  • sync push - Apply local changes back via tRPC update endpoints

Flags

  • --project / -p - Filter by project name or ID
  • --redact / -r - Mask sensitive fields (passwords, env vars, tokens)
  • --dry-run / -d - Preview changes without applying
  • --yes / -y - Skip confirmation prompt

v1 Scope

  • Pull/diff/push for projects, environments, applications, compose, all 5 DB types
  • Sub-resources: domains, ports, mounts, redirects, security
  • Update existing resources only (no create/delete on push)

Deferred to v2

  • Create/delete resources via push
  • Interactive project selection
  • .dokployignore, --format json
  • Syncing global settings (registries, certificates, servers)

I have a working implementation ready in PR #21.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions