Skip to content

Deployment workflow

This page deploys a full stack in order: secrets, configs, database, app, then domain. If a step fails, the command output tells you where to look.

  1. Create secrets

    Create database passwords and app tokens

    Terminal window
    dpl secret create db-root
    dpl secret create db-demo
  2. Add configs

    Place YAML files in <base>/conf.

    /opt/dpl/conf/
    mariadb.yaml
    db-demo.yaml
    app-demo.yaml
    nginx.yaml
    domain-local.yaml
  3. Check db and app units

    Terminal window
    dpl check db-demo
    dpl check app-demo

    Fix broken references before you deploy.

  4. Deploy database first

    To create an empty database:

    Terminal window
    dpl deploy db-demo

    Or restore your database backup from a .sql or .sql.gz file:

    Terminal window
    dpl deploy db-demo ~/backup.sql.gz

    The db-server unit will be deployed automatically.

  5. Deploy the app archive

    Terminal window
    dpl deploy app-demo ~/app-demo.tar.gz

    You can also stream from Git:

    Terminal window
    git archive --format=tar.gz HEAD | dpl deploy app-demo -
  6. HTTP and domain units deploy automatically

    The domain unit and the http-server unit will be deployed automatically after app deploy.

    The domain deploy writes the generated nginx config into the HTTP server state directory and notifies dpl serve.

  7. Inspect the result

    Terminal window
    dpl inspect app-demo

    If a deploy fails, inspect shows the failing stage and points to the build or runtime log.