Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion apps/docs/content/guides/choose-runtime-base.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ title: "Choosing a Runtime Base on Zerops"
description: "**Use Alpine** as the default base for all services. Use Ubuntu only when you need system packages not available in Alpine. Use Docker only for pre-built images."
---

**Use Alpine** as the default base for all services. Switch to Ubuntu only for **glibc** needs (musl incompatibility): CGO-enabled Go, glibc-built Python/C-extension wheels, or the **Deno** runtime (no Alpine build). Needing a package is NOT itself a reason — both bases install packages (`sudo apk add` / `sudo apt-get install`). Use Docker only for pre-built images.
The OS is part of the base identifier, never a separate field: `alpine/<tech>@<ver>` or `ubuntu/<tech>@<ver>` — the same value in the import `type` and in both `build.base` and `run.base` of zerops.yaml. Always write the prefix: a bare `<tech>@<ver>` is legacy and resolves differently per file (import → Ubuntu, zerops.yaml → Alpine), and `run.base` rewrites the service OS on every deploy.

**Prefer Alpine** for standard apps. Switch to Ubuntu only for **glibc** needs (musl incompatibility): CGO-enabled Go, glibc-built Python/C-extension wheels, or the **Deno** runtime (Ubuntu image only). Needing a package is NOT itself a reason — both bases install packages (`sudo apk add` / `sudo apt-get install`). Use Docker only for pre-built images.

## Decision Matrix

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/guides/deployment-lifecycle.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The build container is **temporary** -- created on demand, destroyed after compl

**Step-by-step execution order:**

1. **Container creation** -- base environment from `build.base` + `build.os` (default Alpine)
1. **Container creation** -- base environment from `build.base` (`<os>/<tech>@<ver>`; the prefix selects Alpine or Ubuntu, a bare value resolves to Alpine)
2. **Source code download** -- from GitHub, GitLab, or zcli push to `/var/www`
3. **Cache restoration** -- cached files moved to `/build/source` (no-clobber, source wins)
4. **prepareCommands** -- install additional tools/packages (skipped if cache valid)
Expand Down
7 changes: 4 additions & 3 deletions apps/docs/content/guides/zerops-yaml-advanced.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,10 @@ Configuration is **merged at the section level** -- child values override parent

Available runtimes and versions are listed in **Service Stacks (live)** -- injected by `zerops_knowledge` and workflow responses. Some key rules:

- PHP: build `php@X`, run `php-nginx@X` or `php-apache@X` (different bases)
- Deno: REQUIRES `os: ubuntu` (no Alpine build exists). Gleam runs on both Alpine and Ubuntu.
- Static sites: build `nodejs@latest`, run `static`
- The OS is part of the base value — `ubuntu/nodejs@22` or `alpine/nodejs@22` — with no separate `os:` field; use the same prefix in `build.base` and `run.base` (a bare `nodejs@22` resolves to Alpine, and `run.base` rewrites the service OS on deploy)
- PHP: build `<os>/php@X`, run `<os>/php-nginx@X` or `<os>/php-apache@X` (different bases)
- Deno: ships only as `ubuntu/deno@X` (no Alpine image). Gleam runs on both Alpine and Ubuntu.
- Static sites: build `alpine/nodejs@latest`, run `static`
- `@latest` = newest stable version

---
Loading