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.
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.
Examples
Section titled “Examples”# Curated catalog service, with sensible defaultsmonoceros add-service acme postgres
# Any Docker imagemonoceros add-service acme mongo:7
# Two of a kind, named apartmonoceros add-service acme redis --as=cacheBehavior
Section titled “Behavior”- 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 applyto bring the service up.
See also
Section titled “See also”- Services catalog - what you can add.
monoceros remove-service- the inverse.