Skip to main content

Overview

Docker Compose support in Dokploy allows you to deploy and manage multi-container applications using docker-compose.yml files. You can connect to Git repositories or use raw compose files.

Create Compose Application

Create a new Docker Compose application in your environment.
name
string
required
Display name for the compose application.
appName
string
required
Unique application identifier (used in container names).
environmentId
string
required
The environment ID where this compose app will be deployed.
description
string
Optional description of the application.
serverId
string
Server ID for deployment (required for cloud instances).
cURL
curl -X POST "https://your-dokploy-instance.com/api/compose.create" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My Compose App",
    "appName": "myapp-compose",
    "environmentId": "env-123",
    "description": "Multi-container application"
  }'

Get Compose Application

Retrieve details about a specific compose application.
composeId
string
required
The unique identifier of the compose application.
cURL
curl -X GET "https://your-dokploy-instance.com/api/compose.one?composeId=compose-123" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Update Compose Application

Update configuration for an existing compose application.
composeId
string
required
The ID of the compose application to update.
composeFile
string
The docker-compose.yml content.
env
string
Environment variables in KEY=VALUE format (one per line).
sourceType
string
Source of the compose file: github, gitlab, bitbucket, gitea, git, or raw.
cURL
curl -X POST "https://your-dokploy-instance.com/api/compose.update" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "composeId": "compose-123",
    "env": "DATABASE_URL=postgresql://localhost\nREDIS_URL=redis://localhost"
  }'

Deploy Compose Application

Trigger a deployment of the compose application.
composeId
string
required
The ID of the compose application to deploy.
title
string
Title for the deployment log entry.
description
string
Description for the deployment.
cURL
curl -X POST "https://your-dokploy-instance.com/api/compose.deploy" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "composeId": "compose-123",
    "title": "Production deployment",
    "description": "Deploying version 2.0"
  }'

Redeploy Compose Application

Rebuild and redeploy the compose application.
cURL
curl -X POST "https://your-dokploy-instance.com/api/compose.redeploy" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "composeId": "compose-123",
    "title": "Rebuild"
  }'

Start Compose Application

Start all containers in the compose application.
cURL
curl -X POST "https://your-dokploy-instance.com/api/compose.start" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "composeId": "compose-123"
  }'

Stop Compose Application

Stop all containers in the compose application.
cURL
curl -X POST "https://your-dokploy-instance.com/api/compose.stop" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "composeId": "compose-123"
  }'

Delete Compose Application

Delete a compose application and optionally its volumes.
composeId
string
required
The ID of the compose application to delete.
deleteVolumes
boolean
default:false
Whether to delete associated Docker volumes.
cURL
curl -X POST "https://your-dokploy-instance.com/api/compose.delete" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "composeId": "compose-123",
    "deleteVolumes": true
  }'

Load Services

Retrieve the list of services defined in the compose file.
composeId
string
required
The compose application ID.
type
string
required
The type of deployment: stack or docker-compose.
cURL
curl -X GET "https://your-dokploy-instance.com/api/compose.loadServices?composeId=compose-123&type=docker-compose" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Get Converted Compose

Retrieve the processed compose file with domains and configurations applied.
cURL
curl -X GET "https://your-dokploy-instance.com/api/compose.getConvertedCompose?composeId=compose-123" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Deploy from Template

Deploy a compose application from a pre-built template.
environmentId
string
required
The environment where the template will be deployed.
id
string
required
The template identifier.
serverId
string
Server ID for cloud deployments.
baseUrl
string
Custom base URL for template repository.
cURL
curl -X POST "https://your-dokploy-instance.com/api/compose.deployTemplate" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "environmentId": "env-123",
    "id": "wordpress"
  }'

List Templates

Get available compose templates.
cURL
curl -X GET "https://your-dokploy-instance.com/api/compose.templates" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Move Compose Application

Move a compose application to a different environment.
composeId
string
required
The ID of the compose application to move.
targetEnvironmentId
string
required
The destination environment ID.
cURL
curl -X POST "https://your-dokploy-instance.com/api/compose.move" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "composeId": "compose-123",
    "targetEnvironmentId": "env-456"
  }'

Build docs developers (and LLMs) love