Minimal Configuration
Every EMB project needs a .emb.yml file at its root. Let’s look at the simplest possible configuration.
The Configuration File
Section titled “The Configuration File”Here’s the complete configuration for our hello-world example:
cat .emb.ymlproject: name: hello-world
plugins: - name: autodockerThat’s it - just 5 lines! Let’s break it down.
Project Section
Section titled “Project Section”project: name: hello-worldThe project section is required and must include a name. This name is used for:
- Docker image prefixes (e.g.,
hello-world/api:latest) - Log directories and other generated files
- Identifying the project in command output
Plugins Section
Section titled “Plugins Section”plugins: - name: autodockerPlugins extend EMB’s functionality. The autodocker plugin automatically discovers components by scanning for directories containing a Dockerfile.
Without this plugin, you’d need to manually define each component in your configuration. With it, EMB does the discovery for you.
What This Configuration Does
Section titled “What This Configuration Does”With just these 5 lines, EMB will:
- Scan the project for directories containing
Dockerfile - Register each as a component with sensible defaults
- Create Docker image resources for each component
- Set image names using the pattern
{project-name}/{component-name}:latest
Project Structure
Section titled “Project Structure”Our hello-world example has this structure:
hello-world/├── .emb.yml # Project configuration├── .emb/ # Generated files (gitignored)└── api/ # Component with Dockerfile ├── Dockerfile ├── package.json └── server.jsThe api/ directory contains a Dockerfile, so EMB will discover it as a component.
Next Step
Section titled “Next Step”Continue to Auto-Discovery to see how EMB discovers and configures components.