Skip to content

Docker Compose

EMB wraps Docker Compose to provide a consistent interface for running services. This page covers the essential commands for managing your application.

EMB uses your project’s docker-compose.yml:

Terminal window
cat docker-compose.yml
services:
api:
image: fullstack-app/api:${DOCKER_TAG:-latest}
ports:
- "${API_PORT:-3000}:3000"
environment:
- NODE_ENV=${NODE_ENV:-development}
web:
image: fullstack-app/web:${DOCKER_TAG:-latest}
ports:
- "${WEB_PORT:-8080}:80"
depends_on:
- api

The file references EMB-managed images and environment variables.

Start all services with:

Terminal window
emb up

This will:

  1. Build any images that need building
  2. Create and start all containers
  3. Show logs in real-time

Start specific services:

Terminal window
emb up api

Run in the background:

Terminal window
emb up -d

Or the long form:

Terminal window
emb up --detach

Check running containers:

Terminal window
emb ps

This shows container status, ports, and health.

Follow logs for all services:

Terminal window
emb logs

Follow a specific service:

Terminal window
emb logs api

Get recent logs without following:

Terminal window
emb logs --no-follow api

Stop all services:

Terminal window
emb down

This stops and removes containers, networks, and volumes created by up.

Restart all services:

Terminal window
emb restart

Restart specific services:

Terminal window
emb restart api

Open a shell in a running container:

Terminal window
emb shell api

This opens an interactive shell (typically /bin/sh or /bin/bash).

EMB automatically passes your project’s environment variables to Docker Compose. This means:

  • Variables from .env files are available
  • Variables defined in the env: section are available
  • Command-line overrides work: NODE_ENV=production emb up

Continue to Building Images to learn about building and tagging Docker images.