Skip to content

Unit commands

Use unit commands for normal deploy work.

Validates one unit.

Terminal window
dpl check django-demo

Use it before deploy. It reads the YAML file, checks fields, and resolves references.

Deploys one unit.

Apps require a .tar.gz archive or stdin:

Terminal window
tar -czf /tmp/app.tar.gz -C app .
dpl deploy django-demo /tmp/app.tar.gz
git archive --format=tar.gz HEAD | dpl deploy api -

Database units can take an optional SQL dump:

Terminal window
dpl deploy app-db
dpl deploy app-db ./backup.sql.gz

Other unit types do not accept a path:

Terminal window
dpl deploy nginx
dpl deploy example-domain

Shows deploy state and runtime detail.

Terminal window
dpl inspect django-demo

Use it to see:

  • active version
  • latest deploy status
  • failure message
  • runtime container status for units that have containers
  • timer status for app units

Removes the unit from service.

Terminal window
dpl undeploy django-demo

For app units, this removes the active deployment state and cleans exported files for that version. For runtime units, dpl serve stops supervising the unit and stops its container.

dpl start <name> and dpl timer <name> <timer> are internal commands. dpl serve calls them.

Run normal deploy and timer work through dpl deploy and the serve daemon.