Skip to content
doze
0.2

These are the docs for doze 0.2.

What changed in each release →

Everyday workflows

Start a stack, connect to it, read its logs, run a task, change doze.hcl and stop for the day, in the app or in a terminal.

On this page

You’ll be able to do a normal day’s work with doze: bring a stack up, reach its services from your code, read what they print, change the config, and stop.

Every step works in the app and in a terminal; the app runs the same commands. The examples use Larder, a made-up grocery service from doze-examples.

The Library: larder is up with 13 awake, acme is stopped
The Library. Each stack has a switch; the … menu holds the rest.
  1. Open doze. From Applications, or type doze in a terminal.
  2. Flip the stack’s switch on. It starts what was started last time, or everything the first time.
  3. For something else, open the … menu: Start everything, or, while the stack is down, Choose what starts… to tick the apps you will work on. What they need comes too.

Services you did not start are not off. Most sleep until something connects, then wake. See Sleep and wake.

Larder in the Tiles view, one card per service with its state and memory
A stack's page. 1–4 switch between Tiles, List, Map and Grid.
  1. Open the stack from the Library (⏎ on its row).
  2. Read the states. Each service is awake, dozing (running, nobody connected, counting down to sleep), waking, asleep, crashing (it exited and a restart is due), failed, or off (you switched it off). A task is done, failed or not run.
  3. Press ⏎ on a service to open it: why it is awake, its memory and CPU, and its recent wakes.

An app block gets its connection strings from its own env, so an app doze runs needs nothing more. For a program you start yourself, such as a test runner or psql:

The catalog service: the Reach it card with its URL, address, and IP and port, each with Copy
Inside a service. Copy beside each line; y copies the address.
  1. Open the service.
  2. Press Copy on the line you want, or y for the address. A module’s Connect card also shows the same URL for Node, Python, Go, a shell, .env and psql.
The gateway service's Logs tab
A service's Logs tab. All logs of the stack are one key away.
  1. Open the service and press l for its Logs tab.
  2. For the whole stack, press L on the stack’s page, or ⌘L.

Tasks such as migrations run by themselves before the apps that list them in after, and again when their inputs change. To run one now:

  1. Open the stack and pick the task under Tasks in the sidebar.
  2. Press Run (or ⏎). The output appears on the page; the runs are kept beside it.
  1. Pin a service awake: open it and press Pin awake (p). It stays up with nobody connected until you unpin it or the stack stops.
  2. Put one to sleep now: Sleep (s). Its data stays.
  3. Take one out of this run: flip its row’s switch off. Nothing wakes it, not even a connection, until you switch it on again.
  1. Edit the file. doze lint checks it without touching anything, and doze fmt lays it out.
  2. A running stack keeps the file it started with. The app says so on the stack’s page (“doze.hcl changed 2m ago, after the stack read it”), and a file that does not load is shown with its line.
  3. To apply it, restart the stack: Restart larder in the … menu, or doze down then doze up.

When you only changed structure inside a module (a new role, bucket, queue or topic), doze sync applies it to the running stack. doze sync --dry-run shows what it would do first; sync also drops structure you removed.

Terminal window
doze reset postgres

reset stops the service and deletes its data; the next wake sets it up fresh from the config. It asks first and cannot be undone.

  1. Flip the stack’s switch off on the Library. Every service stops, and so does the stack’s background daemon.
  2. Close the window if you like. The bat stays in the menu bar; quitting the app leaves stacks running.

Next time, doze up offers what you had running.

doze doctor checks the machine setup and the config and says what to fix. In the app the same report is under Settings › Machine. See Troubleshooting, and the CLI reference for every command and flag.