All docs

docs

Deploy a Docker Compose stack

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

Which plan

Compose runs on the Free plan too: MihraOps tracks 1 Compose project at a time. You can save and redeploy that project as often as you like; the quota only closes opening a second one. Pro lifts the ceiling.

Stacks that were already on the server before MihraOps, which it did not create, are listed and spend no quota. Taking one under MihraOps management (adopting it) does spend quota.

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

Use the settings button on a Compose card to create one project webhook and select services to update. Only selected service images are pulled and those services are recreated; dependencies are not restarted. Saving the selection preserves the existing webhook URL and token. Legacy webhooks without a selection update the entire project.

In the Compose editor, Restart saves and runs compose up -d; Restart Pull checks the registry for updated images; Restart Without Cache first rebuilds build services with build --no-cache, then starts the stack.

Combine this with a deploy webhook and a push to your repository can update the stack on its own.

Related guides