Getting started

# Quick start

From a containerizable app to a live deploy on your own server.

## Configure the deploy

After [installing](https://dash.zoolutions.llc/docs/installation) and running `dash init`, describe your deployment in `config/deploy.yml`. The minimum is a service name, an image, servers, and a registry:

```yaml
# The name of your application, used to identify containers on the servers.
service: myapp

# The image name; the registry prefix decides where it is pushed.
image: my-user/myapp

# The hosts to deploy to. A flat list implies a single `web` role.
servers:
  - 192.168.0.1

# Let the proxy terminate SSL for your domain (needs DNS pointed at the
# server and port 443 open).
proxy:
  ssl: true
  host: app.example.com

# The registry to push to (Docker Hub unless `server` says otherwise).
registry:
  username: my-user
  password:
    - DASH_REGISTRY_PASSWORD

# The architecture to build for.
builder:
  arch: amd64
```

Your app needs a `Dockerfile` that boots it on port 80 (or set `proxy: app_port:`), and should answer `GET /up` with a 200 once healthy — that is the default healthcheck the proxy gates traffic on.

## Provide the registry password

Secrets are read from `.dash/secrets` — dotenv format, with command substitution for password managers:

```shell
DASH_REGISTRY_PASSWORD=$DASH_REGISTRY_PASSWORD
```

See the [Environment](https://dash.zoolutions.llc/docs/env) reference for secret env vars and [Secrets adapters](https://dash.zoolutions.llc/docs/secrets) for the vaults `dash secrets fetch` supports.

## First deploy

```shell
dash setup
```

`setup` is the bootstrap-everything path: it installs Docker on the servers if needed, logs in to the registry, boots the proxy and any [accessories](https://dash.zoolutions.llc/docs/accessory), then builds, pushes, and deploys the app. When it finishes, your app is serving traffic.

Not sure the servers are ready? `dash doctor` diagnoses servers, registry, proxy, ports, DNS, and certificates before you commit to a deploy.

## Every deploy after

```shell
dash deploy
```

Builds the image from the current git HEAD, pushes, pulls on the servers, boots the new containers, waits for health, and switches traffic — zero downtime. Roll back to a previous version with:

```shell
dash rollback [VERSION]
```

## Useful from day one

```shell
dash app logs -f          # follow app logs across servers
dash app exec "bin/rails console"   # run a command in the app container
dash details              # what is running where
dash audit                # who deployed what, when
```

The full surface is on the [Commands](https://dash.zoolutions.llc/docs/commands) page, and [Aliases](https://dash.zoolutions.llc/docs/alias) shorten the ones you use daily.