Docker Compose

Docker Compose is a tool for defining and running applications made of several containers, using one YAML file and a single command.

How Docker Compose works

Many applications need more than one process: a web server, a database, a cache, a background worker. Docker Compose describes them together in a file, usually compose.yaml, with each service's image, environment variables, ports, volumes, and dependencies.

Then:

  • docker compose up -d starts everything in the background.
  • docker compose logs -f follows output.
  • docker compose pull then up -d upgrades.
  • docker compose down stops it.

Compose v2 ships as a plugin to the Docker CLI, which is why the command is docker compose with a space.

An example

services:
  app:
    image: example/app:latest
    ports: ["3000:3000"]
    depends_on: [db]
  db:
    image: postgres:16
    volumes: ["db:/var/lib/postgresql/data"]
volumes:
  db:

That file runs an app and its database with a persistent volume.

Why it matters for AI-agent publishing

Self-hosting is only practical if setup is short and upgrades are routine. Compose gives a repeatable setup on any machine with Docker, from a laptop to a small cloud VM.

SocialHandoff supports Docker Compose for self-hosting, alongside an all-in-one image and a ./run.sh script for local use. Set encryption and other settings through environment variables with the SOCIALHANDOFF_ prefix. The self-hosting guide walks through it, and getting started covers first sign-in.

Let your agents post. Keep the final say.

Connect your first agent in minutes. Every draft waits in your inbox until you approve it.

14 days free. No card required.

The hosted version is opening soon

Leave your email and we will send one message when hosted accounts open, with your 14-day trial ready. Want it today? Self-host it free from the repo.

Start free trial