Skip to content

Self-improving AI Employees for everyone

docs(deploy): correct stale statements in deploy docs and comments

trohitge00c2db14a8c
diff --git a/cli/terraform/gcp/main.tf b/cli/terraform/gcp/main.tf
index b7e0b59b..40804ca0 100644
--- a/cli/terraform/gcp/main.tf
+++ b/cli/terraform/gcp/main.tf
@@ -16,7 +16,7 @@ provider "google" {
locals {
# ``resource_name`` is persisted by the CLI. Existing deployments retain
# ``machinaos`` to avoid replacing live resources; new deployments use
- # ``company``.
+ # ``opencompany`` (``NAME`` in cli/commands/deploy/_state.py).
use_local = var.source_mode == "local"
res_name = var.resource_name
bucket_name = "${var.project}-${var.resource_name}"
@@ -61,8 +61,9 @@ resource "google_compute_firewall" "app" {
network = "default"
allow {
- # CF-proxied front door (80 http-redirected, 443 TLS via nginx) + SSH +
- # the app port for direct-IP access.
+ # 80/443 for a reverse proxy the operator adds in front (startup.sh.tftpl
+ # installs none; the app serves plain HTTP on var.port) + SSH + the app
+ # port for direct-IP access.
protocol = "tcp"
ports = ["80", "443", tostring(var.port), "22"]
}
@@ -83,7 +84,7 @@ resource "google_compute_instance" "vm" {
initialize_params {
# Ubuntu 24.04 ships Python 3.12 natively — required by the package's
# install (server needs >=3.11,<3.13; the CLI needs >=3.12). 22.04
- # ships 3.10 and the npm postinstall hard-fails on it.
+ # ships 3.10 and `company provision` (scripts/install.js) hard-fails on it.
image = "ubuntu-os-cloud/ubuntu-2404-lts-amd64"
size = 40
type = "pd-balanced"
diff --git a/cli/terraform/gcp/variables.tf b/cli/terraform/gcp/variables.tf
index dac7aaa6..79f644db 100644
--- a/cli/terraform/gcp/variables.tf
+++ b/cli/terraform/gcp/variables.tf
@@ -33,7 +33,7 @@ variable "allow_cidr" {
variable "source_mode" {
type = string
- description = "Install source: 'local' (npm pack tarball via bucket) or 'release' (npm registry)."
+ description = "Install source: 'local' (bun pm pack tarball via bucket) or 'release' (npm registry)."
}
variable "opencompany_version" {
@@ -49,7 +49,7 @@ variable "resource_name" {
variable "pack_tarball" {
type = string
default = ""
- description = "Absolute path to the npm pack tarball (source_mode = 'local')."
+ description = "Absolute path to the bun pm pack tarball (source_mode = 'local')."
}
variable "app_env" {
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 662d4b24..b30ae210 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -10,8 +10,9 @@
#
# The default image carries no optional tools. EXTRAS adds them, space
# separated:
-# browser Chromium, fonts and Xvfb for the browser node, and uv, which
-# installs the Browser node's browser-use CLI
+# browser Chromium and fonts for the Browser node, uv, which installs the
+# node's browser-use CLI, and Xvfb (installed, never started: the
+# node runs headless)
# git git, for the Claude Code and Codex agent nodes (they work in git
# worktrees)
#
@@ -72,16 +73,17 @@ COPY --from=bun /usr/local/bin/bun /usr/local/bin/bun
COPY --from=build /extras/bin/ /usr/local/bin/
# The image has no Node. npm CLIs whose bin scripts start
-# `#!/usr/bin/env node` (agent-browser, vercel, cf) run on bun under that
-# name, as in the official oven/bun images.
+# `#!/usr/bin/env node` (vercel, cf) run on bun under that name, as in the
+# official oven/bun images.
RUN ln -s /usr/local/bin/bun /usr/local/bin/node
# browser: Debian's /usr/bin/chromium launcher takes extra flags only from
# /etc/chromium.d/ (it resets CHROMIUM_FLAGS from the environment) and
# already adds --disable-dev-shm-usage when /dev/shm is small; the drop-in
# adds --no-sandbox, without which Chrome refuses to run as root. The
-# browser node runs headed by default and agent-browser starts a private Xvfb
-# display when DISPLAY is unset.
+# Browser node runs Chromium headless (BROWSER_HEADLESS below) and starts no
+# display; BROWSER_HEADLESS=false refuses to launch without DISPLAY or
+# WAYLAND_DISPLAY, and nothing in the image starts Xvfb.
RUN set -eu; \
pkgs=""; \
for extra in $EXTRAS; do \
diff --git a/docs-internal/deployment_legacy.md b/docs-internal/deployment_legacy.md
index bca8bd93..ae8fe3a8 100644
--- a/docs-internal/deployment_legacy.md
+++ b/docs-internal/deployment_legacy.md
@@ -17,8 +17,9 @@ One command provisions a login-gated OpenCompany VM on a cloud provider. Two sta
ADC verification + API enablement.
2. **Terraform** (`cli/terraform/gcp/`) owns all resources — new VMs use the
`opencompany` resource id,
- firewall, artifact bucket (local `npm pack` source), service account, and a cloud-init startup
- script that installs Node 22 + uv + the package and runs `company serve` under systemd.
+ firewall, artifact bucket (local `bun pm pack` source), service account, and a cloud-init startup
+ script (`startup.sh.tftpl`) that installs bun + uv (no Node, no npm), `bun add -g`s the package,
+ provisions its Python side with `company provision`, and runs `company serve` under systemd.
Login gate = built-in auth (`VITE_AUTH_ENABLED=true`, `AUTH_MODE=single`) with the owner
credential generated at deploy time and seeded on first boot. `build_app_env`
@@ -35,7 +36,7 @@ company deploy destroy # terraform des
| Path | Responsibility |
|------|----------------|
-| `cli/commands/serve.py` | Single-port runtime: uvicorn fronts API + WS + built SPA. `serve` supervises exactly one process — the Node.js code-exec sidecar, WhatsApp and the Temporal dev server are backend-owned and spawn on demand |
+| `cli/commands/serve.py` | Single-port runtime: uvicorn fronts API + WS + built SPA. `serve` supervises exactly one process — the JS code-exec sidecar (on bun), WhatsApp and the Temporal dev server are backend-owned and spawn on demand |
| `cli/commands/deploy/` | Verbs (`up.py` / `status.py` / `destroy.py`), `_secrets.py`, `_state.py`, `_terraform.py` (Terraform driver), `providers/` (`gcp.py` / `aws.py` provider CLI adapters) |
| `cli/terraform/gcp/` | HCL module (`main.tf` / `variables.tf` / `outputs.tf`) + `startup.sh.tftpl` cloud-init template |
@@ -328,7 +329,7 @@ docker-compose -f docker-compose.prod.yml down -v
## Local Development Build (current, non-Docker)
```bash
-# Full production build (company build: bun install, client, sidecar, uv sync, bytecode, Temporal binary)
+# Full production build (company build: bun install, client, sidecar, uv sync --extra docs, bytecode, Temporal binary)
bun run build
# Serve the built SPA + API on one port, exactly as a deployed VM does