Skip to content

Docker Deployment

ewyct edited this page May 4, 2026 · 3 revisions

Docker Deployment

Lastest ships with two production deploy targets and a Docker-Compose-based home server flow. Both production targets share the same multi-stage Dockerfile.

Target Script Stack
ZimaBoard / CasaOS pnpm deploy:zima Docker Compose -- single host
Olares / Kubernetes pnpm deploy:olares Two-pod app split (envoy + envoy-less) on k8s

Quick Start (home server, Docker Compose)

git clone https://github.com/las-team/lastest.git
cd lastest
docker compose up -d

The bundled compose stack starts:

  • PostgreSQL on :5432 (data persists in the named volume lastest-pgdata)
  • Lastest app on :3000

Open http://localhost:3000.

Embedded Browser pods are provisioned dynamically by the app. In a single-host Docker Compose deployment they are launched via the kubernetes provisioner against your cluster (EB_PROVISIONER=kubernetes, see Environment Variables); there is no Compose-only EB fallback.


Commands

docker compose up -d       # Start in background
docker compose logs -f      # View logs
docker compose down         # Stop (data persists in `lastest-pgdata`)
docker compose down -v      # Stop and wipe the database
docker compose pull         # Pull latest image

Image Details

  • Based on the official Playwright base image (mcr.microsoft.com/playwright)
  • Node.js 20
  • Multi-stage build for smaller final image
  • Health check via GET /api/health
  • Runs as non-root user
  • Entrypoint runs drizzle-kit push --force on startup (auto-migrates schema)

Volumes

Volume Purpose
lastest-pgdata PostgreSQL data directory
lastest-screenshots Captured screenshots and baselines
lastest-runs Per-build run artefacts (videos, traces, logs)

SQLite is no longer used. Lastest moved to PostgreSQL with Drizzle ORM in v1.10.


Required Environment Variables

The minimum prod set (see Environment Variables for the complete list):

POSTGRES_PASSWORD=...               # Postgres password used by the compose service
DATABASE_URL=postgresql://lastest:${POSTGRES_PASSWORD}@db:5432/lastest
BETTER_AUTH_SECRET=$(openssl rand -hex 32)
SYSTEM_EB_TOKEN=$(openssl rand -hex 32)
EB_PROVISIONER=kubernetes
EB_NAMESPACE=lastest
EB_IMAGE=lastest-embedded-browser:latest
LASTEST_URL=https://your-public-host    # URL the EB pods use to reach back

Olares (Kubernetes) Deployment

pnpm deploy:olares runs two app pods that share state via the database:

Pod Purpose
lastest-dev (envoy-fronted) Public traffic via the Olares envoy gateway
lastest-internal-dev (envoy-less) Internal endpoints (EB callbacks, runner WebSocket) without envoy buffering

Both must be rolled together when deploying. EB pods are scheduled into the same cluster via the lastest namespace -- the manifests live under k8s/ in the repo.


Embedded Browser Stack

Tests run only inside Embedded Browser pods. Local-Playwright execution on the host is no longer supported -- in any environment (dev or prod) you need:

  1. A k8s-compatible cluster (k3d for local dev, your real cluster in prod)
  2. The lastest namespace + RBAC from k8s/
  3. The lastest-embedded-browser image built and reachable to the cluster
  4. EB_PROVISIONER=kubernetes plus the EB env vars in Environment Variables

For local dev see Getting Started -- the pnpm stack script bootstraps the whole thing.

Clone this wiki locally