All docs

docs

Pro

Deploy a Docker Compose stack

Multi-container applications — an app with its database, cache and worker — deploy as one unit.

How a stack is stored

Each stack becomes a project directory on your server under ~/.mihraops/compose/<project>/, with your docker-compose.yml inside it. Extra files the compose file references — an .env, an init script, a config file — are placed in the same directory.

This is an ordinary Compose project. If MihraOps disappeared tomorrow you could cd into that directory and run docker compose up -d by hand.

Deploy the stack

  1. 01Choose or import your docker-compose.yml.
  2. 02Give the project a name. It becomes the Compose project name and the directory name, so it must be lowercase letters, digits, dashes or underscores.
  3. 03Add any extra files the compose file needs.
  4. 04Deploy. MihraOps writes the files over SSH and runs Compose on the server.

Compose v1 and v2

MihraOps uses docker compose (the v2 plugin) when it is available and falls back to the standalone docker-compose binary when it is not. You do not have to pick.

Updating a stack

Edit the compose file and deploy again: the stack is reconciled, only changed services restart. Combine this with a deploy webhook and a push to your repository can update the stack on its own.

Related guides