app.nzapp
AppsProjectsReposPullsChatIntegrationsGatewayModelsEvalsToolsDatasetsMCPDeploysPricingBlogDocsAssistantsCharactersArtMusic
Sign inStart building
Agent stack
Cloud coding agentAgents SDKIntegrationsBrowser agentMonitors & auto-agentsSchedulersAgent skillsMCP serversDeep research
Models & API
AI GatewayModel catalogModel evalsModel spacesPlaygroundText to imageImage to 3DText to 3DMusic & SFXAudio editorMedia optimizerAI art & libraryChatAPI referenceSchemaBecome a provider
Compute & hosting
DeploysAddonsPostgres hostinggobed vector searchSite hostingAnalyticsCog GPU hostingRL trainingBuilds & CIWorkersTask queuesDomainsGit hosting
Tools
AI toolsDrawDiffusion canvasLive DrawWriteSheetsArtifactsVideo studioNotebooksDatasets
Learn
DocsBlogEval guidesPrompt libraryCLIAlternativesPapersAI charactersArt gallerySecurityConsulting
Company
PricingEnterpriseSettingsBillingStatusInvestorsCreate accountTerms of ServicePrivacy Policy
app.nzapp.nz

AI agent cloud for coding, deploys, model routing, and research. Built for teams shipping software.

Built in New Zealand by App AI NZ.

Social
X / TwitterGitHubYouTube
The app.nz network
GpuBrainPapersReading TimemojojojoNetwrckText-Generator.ioCodex InfinityOpenPathsCuteDSLAI Art GeneratorAIArt-Generator.artSiteSimSimplexGenDictatorFlowWebFiddleRing.nzChatGibidyBitBankExperimentFlowEvangelerHires.nzHow.nzV5 GamesAddicting Word GamesBig Multiplayer ChessWord SmashingreWord GameMultiplication Master
© 2026 App AI NZ Ltd. All rights reserved.All systems normalTermsPrivacy
Blog
July 7, 2026·6 min read·app.nz

CI service containers without shared state

Inside app.nz CI: per-run Docker networks, Postgres/Redis/Mongo service aliases, per-step containers, readiness checks, timeouts, and label-based cleanup.

Listen to this article

On-device voice

Uses the voice built into your browser; no article text leaves this page.

Audio narration is not supported by this browser.

CI looks easy until tests need Postgres, Redis, Mongo, environment variables, isolated networks, timeouts, logs, and cleanup. app.nz CI keeps the model simple: a run owns a Docker network, services live on that network, and every step runs in a short-lived container.

That gives users the shape they expect from hosted CI without turning the runner into a full cluster scheduler.

Services are part of the run

A pipeline can request services. The runner starts each service container once per run with a deterministic alias:

ServiceAliasInjected env
PostgrespostgresDATABASE_URL
RedisredisREDIS_URL
MongomongoMONGO_URL

The step container does not need to know the container id. It connects to postgres:5432 or redis:6379 over the run network.

This is better than a shared test database because each run gets fresh state. Parallel CI runs cannot race through the same schema.

Step containers are disposable

Each command runs in its own container with the repo mounted at /work. The workspace persists through the mounted directory, but the process tree does not.

That is a useful compromise:

  • npm install can write node_modules for later steps,
  • cargo can write target for later steps,
  • a background process started by one step cannot silently survive into another,
  • the runner can timeout and remove the container cleanly.

The current runner uses a 15-minute timeout per step and a 45-minute timeout for the whole run. Those numbers are product defaults, not security boundaries, but they stop stuck jobs from becoming permanent capacity leaks.

Readiness matters

Starting a Postgres container is not the same as Postgres accepting connections. The runner waits for service readiness before executing steps that depend on it. Without that wait, CI becomes flaky under load because tests race service boot.

Good CI infrastructure is mostly removing races users should not have to think about.

Labels are the cleanup API

Every run-owned container gets a label. Teardown can sweep by label even if a particular code path forgot a container id. The network name also includes the run id, so removal is deterministic.

That label strategy matters for failure cases:

  • checkout failed after services started,
  • a step timed out,
  • a service health check never passed,
  • the runner process returned early,
  • a test script spawned children.

The cleanup code should not need a perfect memory of how far the run got. It should ask Docker what still belongs to the run and remove it.

Why not run everything in one big container?

One container per run is simpler, but it hides process leaks and couples unrelated steps. One container per command gives the runner a hard boundary around step lifetime while still sharing the filesystem.

The extra docker run overhead is acceptable because CI is dominated by dependency install, compile, test, and service startup time. The isolation and debuggability are worth it.

The product result

Users see a pipeline with steps and services. Internally, app.nz sees named resources with owners:

run id docker network service containers step container mounted workspace logs timeout cleanup label

That accounting is the difference between "we execute shell commands" and "we operate CI."

Build what you just read

Ship agents, models, and apps on one cloud.

Start with free credits, then use the same platform from the web app, CLI, desktop app, or MCP.

Start building freeRead the docs

Keep reading

How we built isolated containers for agents and CI

The app.nz isolation model: per-run Docker networks, per-step containers, service sidecars, temp Docker auth, label cleanup, timeouts, and remote machines for bigger blast-radius boundaries.

Hosted addons: Postgres with pgvector + PostGIS, and gobed GPU vector search

Attach managed services to any app or agent in one command — gobed GPU CAGRA vector search, PostgreSQL with HNSW vectors, PostGIS and graph traversal, Mongo, cache, auth, and AI monitoring — with env vars injected into every runtime.

Why Docker cold starts are slow

A cold start is scheduling, image pull, Python import, CUDA init, weight loading, compilation, readiness, and first inference. Here is how app.nz reduces each part.