Skip to content

monoceros add-service

Adds a backing service (database, cache, object store) to a workbench’s config, by curated catalog name or any Docker image. It comes up alongside the workspace on the next monoceros apply.

Terminal window
monoceros add-service <name> <service-or-image> [--as=<service-name>] [--yes]

<service-or-image> is a curated catalog name (postgres, redis, …) or any image ref (mongo:7). Use --as to give the service a custom name in the compose project - handy when you run two of the same kind.

Terminal window
# Curated catalog service, with sensible defaults
monoceros add-service acme postgres
# Any Docker image
monoceros add-service acme mongo:7
# Two of a kind, named apart
monoceros add-service acme redis --as=cache
  • Idempotent. Re-adding the same service with the same image is a no-op. The same name with a different image is an error - remove it first.
  • No confirmation prompt. The edit is written straight to the yml as soon as you run the command.
  • Edits the yml only. Run monoceros apply to bring the service up.