One container, one process, the event log on a named volume so a restart resumes instead of starting over. This is the shape Choose your deployment points at for Docker Compose running everything in one process.

1. Prerequisites

Docker with the compose plugin (docker compose version).

2. Install

Nothing to install beyond Docker; the stack pulls the jaque image on first up. See Docker for what the image is built on and how every flag maps to a JAQUE_<FLAG> environment variable.

3. The files

The canonical copy of both files below is deploy/compose/single/docker-compose.yml and deploy/compose/single/jaque.cue in the repository.

# deploy/compose/single/docker-compose.yml
services:
  jaque-data-init:
    image: busybox:1.36
    command: ["chown", "-R", "65532:65532", "/var/lib/jaque"]
    volumes:
      - jaque-data:/var/lib/jaque

  jaque:
    image: ${JAQUE_IMAGE:-jaque:latest}
    environment:
      JAQUE_CONFIG: /etc/jaque/config.cue
      JAQUE_LISTEN: 0.0.0.0:8080
      JAQUE_EVENTLOG: file:///var/lib/jaque/log
    volumes:
      - ./jaque.cue:/etc/jaque/config.cue:ro
      - jaque-data:/var/lib/jaque
    ports:
      - "8080:8080"
    restart: unless-stopped
    depends_on:
      jaque-data-init:
        condition: service_completed_successfully

volumes:
  jaque-data: {}
// deploy/compose/single/jaque.cue
hosts: {
	self: {
		address: "127.0.0.1"
		check: {type: "icmp", host: "127.0.0.1"}
	}
}

jaque-data-init exists for one reason: a fresh named volume is created owned by root, and the image never runs as root to fix that itself. It runs once and exits; jaque waits for it.

4. Start

cd deploy/compose/single
docker compose up -d

5. Verify

docker compose exec jaque /jaque version
curl http://localhost:8080/status.json

The dashboard is at http://localhost:8080/.

6. Where things live

Config is the mounted jaque.cue, read-only. State (the event log) is the jaque-data named volume, at /var/lib/jaque inside the container. Logs go to docker compose logs jaque.

7. Upgrade

docker compose pull jaque
docker compose up -d jaque

Set JAQUE_IMAGE to pin a specific tag instead of latest. The event log on the named volume survives the upgrade.

8. Next steps

CUE in practice adds services and contacts to jaque.cue. Contacts and policies wires a hard state to a person. Metrics is what /metrics on this same port exposes, and the dashboard it describes at the bottom of that page.

9. Security considerations

ports: ["8080:8080"] publishes the dashboard, the API and /metrics to every interface of the host; see Docker, section 4, and Security before exposing this beyond a workstation.