EveryDocumentation Index
Fetch the complete documentation index at: https://docs.grounds.gg/llms.txt
Use this file to discover all available pages before exploring further.
grounds push --target=staging creates a preview environment: a fresh namespace, a fresh deployment, and a public URL. They’re built for sharing — review apps, demos, end-to-end test runs against a real cluster.
Anatomy of a preview env
| Property | Value |
|---|---|
| Namespace | preview-<short-id> (auto-generated) |
| Hostname | <manifest-name>-pr<short-id>.mc.grnds.io (Minecraft) or …dev.grnds.io (service workloads) |
| TTL | 7 days from creation, sweep runs every 30 min |
| Quota | One ResourceQuota per env, defaults to project-level limits |
| Network | Default-deny NetworkPolicy + explicit allows for ingress + DNS |
Listing your previews
--include-deleted to see envs that were swept by the janitor.
Pinning
Pinning skips the TTL janitor — the env stays alive until you unpin or delete it explicitly. Useful for long-running demos or a staging environment a non-developer is using.Lifecycle internals
When you push tostaging, forge:
- Builds your image (same as
dev). - Creates a
PreviewEnvrow with a generated short ID. - Provisions a
preview-<id>namespace with quota + default-deny NetworkPolicy. - Deploys the workload into that namespace.
- Configures an ingress at
<name>-pr<id>.mc.grnds.io(Minecraft workloads) or…dev.grnds.io(serviceworkloads).
PreviewJanitor runs every 30 minutes:
- Lists all
PreviewEnvrows whereexpiresAt < now() AND deletedAt IS NULL AND pinned = false. - Deletes the namespace (which cascades the deployment, ingress, etc.).
- Sets
deletedAton the row so it stops being considered.
grounds preview list --include-deleted will show them.
When not to use staging
- Inner-loop iteration on your own machine — use
groundsTestLocalinstead. It’s offline, free, and 5 seconds per cycle. See Local development. - Long-lived dev environments for one person — that’s what
--target=devis for. It doesn’t burn a fresh namespace per push.
