monkeys
Concepts

Namespace

A namespace is the part of a profile's name that belongs to the project. The + line of a .monkeys file sets it, and every @ line in that file is read with it…

A namespace is the part of a profile's name that belongs to the project. The + line of a .monkeys file sets it, and every @ line in that file is read with it in front: in a file that starts with +foo, @test is the profile foo.test, and its secrets are stored as foo.test/DATABASE_URL.

What it is for

Two projects that both call a profile test would otherwise share test/DATABASE_URL. With a namespace each keeps its own, since bar.test/DATABASE_URL is another secret, and list shows the two under separate profiles.

Where it is written

Once, in the file. It is the same in every clone and needs no git remote or directory name to agree with. A namespace takes letters, digits, _, - and ., usually the repository's name; a group that publishes several projects can use reverse domain name notation, as in +dev.eastriver.foo.

Referring to a profile

Inside the project the namespace is never typed. A profile is @test or @production, and the file supplies the rest. The full name works from anywhere, since it is only the profile's name; inside a project, a dotted name the file does not declare is read as another project's:

monkeys run @production ./deploy          # inside foo
monkeys preview @foo.production           # from anywhere
monkeys fill @bar.test --with @foo.test   # across projects

Without one

A file with no + line names its profiles as written, so @test there is the profile test, stored as test/DATABASE_URL, and a second project that also says @test would share it.

On this page