B. Blue Green a software delivery tutorial
Vol. I § Zero-downtime series § A series for junior developers
Zero-downtime delivery · 9 / 10 ·

Vault Agent writes secrets into memory

Through every previous chapter, one thing was deliberately left unspoken: where does the app get its database password? The wrong answer: write it in the Dockerfile or in compose. This lab's answer: secrets live in Vault, at secret/data/apps/titikterang, and the Vault Agent writes them into memory exactly when the app needs them.

Vault AgenttmpfstitikterangThe agent writes secrets into memory. The image holds none.

The app reads the file the agent writes to /vault/secrets. The app waits until the agent is healthy. The RoleID and wrap token sit in a read-only host directory — not in the image, not in compose.

Quick recap

  • Secrets arrive at runtime through the agent — never baked in at build time.
  • The tmpfs volume keeps secrets in memory, only while the app lives.
  • The app waits for the agent to be healthy — that order must never be reversed.

Reader notes

Chapter discussion appears once Giscus is connected to the site repository.