*.garden.ymlfilename for each module configuration file. For example, you might prefer to set the module name in the filename, e.g.
my-module.garden.ymlto make it easier to find in a large project.
containermodule type corresponds to a Docker image, either built from a local Dockerfile or pulled from a remote repository.
garden buildcommand to build your modules.
testson them. The
kubernetesproviders, for example, can take these service definitions, generate Kubernetes manifests and deploy them. This is generally much easier to use than the below
helmmodule types, but in turn loses some of the flexibility of those two.
kubernetesproviders can then deploy. Use this for any custom manifests you need or already have, and when you don't need the capabilities of the more complex
excludefields are a simple way to explicitly specify which sources should belong to a particular module. They both accept a list of POSIX-style paths or globs. For example:
Dockerfileand all the
my-sources/, but exclude the
include, only those files/patterns are included. If you then specify one or more
excludefiles or patterns, those are filtered out of the files matched by
include. If you only specify
exclude, those patterns will be filtered out of all files in the module directory.
.gitignorefiles, to exclude files across your project. You can place them in your project root, in module roots, and even in individual sub-directories of modules.
garden.ymlfile. One common situation is where more than one Dockerfile is in use (e.g. one for a development build and one for a production build). You may only have a handful of modules, and it may be the cleanest approach to define all of them in a
modules.garden.ymlin your project root.
---) between the module definitions. Here's a simple (if a bit contrived) example:
includedirective to tell Garden where the source code for each modules resides.
imagedirective to include an external Docker image with the project. This module has no source code of its own.
disabled: truein the module config file. You can also disable it conditionally using template strings. For example, to disable a particular module for a specific environment, you could do something like this: