1. Registry
  2. Packages
  3. Dokploy
  4. API Docs
  5. Compose
Viewing docs for Dokploy v0.3.1
published on Tuesday, Sep 29, 2026 by dimeskigj
dokploy logo Dokploy
Viewing docs for Dokploy v0.3.1
published on Tuesday, Sep 29, 2026 by dimeskigj

    A Dokploy Compose stack.

    Create Compose Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Compose(name: string, args: ComposeArgs, opts?: CustomResourceOptions);
    @overload
    def Compose(resource_name: str,
                args: ComposeArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Compose(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                environment_id: Optional[str] = None,
                name: Optional[str] = None,
                source: Optional[ComposeSourceArgs] = None,
                app_name: Optional[str] = None,
                compose_type: Optional[str] = None,
                create_env_file: Optional[bool] = None,
                delete_volumes_on_destroy: Optional[bool] = None,
                description: Optional[str] = None,
                environment: Optional[str] = None,
                server_id: Optional[str] = None)
    func NewCompose(ctx *Context, name string, args ComposeArgs, opts ...ResourceOption) (*Compose, error)
    public Compose(string name, ComposeArgs args, CustomResourceOptions? opts = null)
    public Compose(String name, ComposeArgs args)
    public Compose(String name, ComposeArgs args, CustomResourceOptions options)
    
    type: dokploy:Compose
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "dokploy_compose" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args ComposeArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ComposeArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ComposeArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ComposeArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ComposeArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var composeResource = new Dokploy.Compose("composeResource", new()
    {
        EnvironmentId = "string",
        Name = "string",
        Source = new Dokploy.Inputs.ComposeSourceArgs
        {
            Type = "string",
            Git = new Dokploy.Inputs.GitComposeSourceArgs
            {
                Branch = "string",
                Url = "string",
                ComposePath = "string",
                EnableSubmodules = false,
                SshKeyId = "string",
                WatchPaths = new[]
                {
                    "string",
                },
            },
            Gitlab = new Dokploy.Inputs.GitLabComposeSourceArgs
            {
                Branch = "string",
                IntegrationId = "string",
                Namespace = "string",
                Owner = "string",
                ProjectId = 0,
                Repository = "string",
                ComposePath = "string",
                EnableSubmodules = false,
                WatchPaths = new[]
                {
                    "string",
                },
            },
            Raw = new Dokploy.Inputs.RawComposeSourceArgs
            {
                ComposeFile = "string",
            },
        },
        AppName = "string",
        ComposeType = "string",
        CreateEnvFile = false,
        DeleteVolumesOnDestroy = false,
        Description = "string",
        Environment = "string",
        ServerId = "string",
    });
    
    example, err := dokploy.NewCompose(ctx, "composeResource", &dokploy.ComposeArgs{
    	EnvironmentId: pulumi.String("string"),
    	Name:          pulumi.String("string"),
    	Source: &dokploy.ComposeSourceArgs{
    		Type: pulumi.String("string"),
    		Git: &dokploy.GitComposeSourceArgs{
    			Branch:           pulumi.String("string"),
    			Url:              pulumi.String("string"),
    			ComposePath:      pulumi.String("string"),
    			EnableSubmodules: pulumi.Bool(false),
    			SshKeyId:         pulumi.String("string"),
    			WatchPaths: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    		},
    		Gitlab: &dokploy.GitLabComposeSourceArgs{
    			Branch:           pulumi.String("string"),
    			IntegrationId:    pulumi.String("string"),
    			Namespace:        pulumi.String("string"),
    			Owner:            pulumi.String("string"),
    			ProjectId:        pulumi.Int(0),
    			Repository:       pulumi.String("string"),
    			ComposePath:      pulumi.String("string"),
    			EnableSubmodules: pulumi.Bool(false),
    			WatchPaths: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    		},
    		Raw: &dokploy.RawComposeSourceArgs{
    			ComposeFile: pulumi.String("string"),
    		},
    	},
    	AppName:                pulumi.String("string"),
    	ComposeType:            pulumi.String("string"),
    	CreateEnvFile:          pulumi.Bool(false),
    	DeleteVolumesOnDestroy: pulumi.Bool(false),
    	Description:            pulumi.String("string"),
    	Environment:            pulumi.String("string"),
    	ServerId:               pulumi.String("string"),
    })
    
    resource "dokploy_compose" "composeResource" {
      pulumi {
        replace_on_changes = [environment_id, server_id]
      }
      lifecycle {
        create_before_destroy = true
      }
      environment_id = "string"
      name           = "string"
      source = {
        type = "string"
        git = {
          branch            = "string"
          url               = "string"
          compose_path      = "string"
          enable_submodules = false
          ssh_key_id        = "string"
          watch_paths       = ["string"]
        }
        gitlab = {
          branch            = "string"
          integration_id    = "string"
          namespace         = "string"
          owner             = "string"
          project_id        = 0
          repository        = "string"
          compose_path      = "string"
          enable_submodules = false
          watch_paths       = ["string"]
        }
        raw = {
          compose_file = "string"
        }
      }
      app_name                  = "string"
      compose_type              = "string"
      create_env_file           = false
      delete_volumes_on_destroy = false
      description               = "string"
      environment               = "string"
      server_id                 = "string"
    }
    
    var composeResource = new Compose("composeResource", ComposeArgs.builder()
        .environmentId("string")
        .name("string")
        .source(ComposeSourceArgs.builder()
            .type("string")
            .git(GitComposeSourceArgs.builder()
                .branch("string")
                .url("string")
                .composePath("string")
                .enableSubmodules(false)
                .sshKeyId("string")
                .watchPaths("string")
                .build())
            .gitlab(GitLabComposeSourceArgs.builder()
                .branch("string")
                .integrationId("string")
                .namespace("string")
                .owner("string")
                .projectId(0)
                .repository("string")
                .composePath("string")
                .enableSubmodules(false)
                .watchPaths("string")
                .build())
            .raw(RawComposeSourceArgs.builder()
                .composeFile("string")
                .build())
            .build())
        .appName("string")
        .composeType("string")
        .createEnvFile(false)
        .deleteVolumesOnDestroy(false)
        .description("string")
        .environment("string")
        .serverId("string")
        .build());
    
    compose_resource = dokploy.Compose("composeResource",
        environment_id="string",
        name="string",
        source={
            "type": "string",
            "git": {
                "branch": "string",
                "url": "string",
                "compose_path": "string",
                "enable_submodules": False,
                "ssh_key_id": "string",
                "watch_paths": ["string"],
            },
            "gitlab": {
                "branch": "string",
                "integration_id": "string",
                "namespace": "string",
                "owner": "string",
                "project_id": 0,
                "repository": "string",
                "compose_path": "string",
                "enable_submodules": False,
                "watch_paths": ["string"],
            },
            "raw": {
                "compose_file": "string",
            },
        },
        app_name="string",
        compose_type="string",
        create_env_file=False,
        delete_volumes_on_destroy=False,
        description="string",
        environment="string",
        server_id="string")
    
    const composeResource = new dokploy.Compose("composeResource", {
        environmentId: "string",
        name: "string",
        source: {
            type: "string",
            git: {
                branch: "string",
                url: "string",
                composePath: "string",
                enableSubmodules: false,
                sshKeyId: "string",
                watchPaths: ["string"],
            },
            gitlab: {
                branch: "string",
                integrationId: "string",
                namespace: "string",
                owner: "string",
                projectId: 0,
                repository: "string",
                composePath: "string",
                enableSubmodules: false,
                watchPaths: ["string"],
            },
            raw: {
                composeFile: "string",
            },
        },
        appName: "string",
        composeType: "string",
        createEnvFile: false,
        deleteVolumesOnDestroy: false,
        description: "string",
        environment: "string",
        serverId: "string",
    });
    
    type: dokploy:Compose
    properties:
        appName: string
        composeType: string
        createEnvFile: false
        deleteVolumesOnDestroy: false
        description: string
        environment: string
        environmentId: string
        name: string
        serverId: string
        source:
            git:
                branch: string
                composePath: string
                enableSubmodules: false
                sshKeyId: string
                url: string
                watchPaths:
                    - string
            gitlab:
                branch: string
                composePath: string
                enableSubmodules: false
                integrationId: string
                namespace: string
                owner: string
                projectId: 0
                repository: string
                watchPaths:
                    - string
            raw:
                composeFile: string
            type: string
    

    Compose Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Compose resource accepts the following input properties:

    EnvironmentId string
    The target environment ID.
    Name string
    The Compose stack name.
    Source Dimeskigj.ComposeSource
    The Compose source configuration.
    AppName string
    The optional deployed stack name.
    ComposeType string
    The Compose deployment type.
    CreateEnvFile bool
    Whether to create an environment file.
    DeleteVolumesOnDestroy bool
    Whether to delete volumes on destroy.
    Description string
    An optional stack description.
    Environment string
    Environment variables for the stack.
    ServerId string
    The optional server ID.
    EnvironmentId string
    The target environment ID.
    Name string
    The Compose stack name.
    Source ComposeSourceArgs
    The Compose source configuration.
    AppName string
    The optional deployed stack name.
    ComposeType string
    The Compose deployment type.
    CreateEnvFile bool
    Whether to create an environment file.
    DeleteVolumesOnDestroy bool
    Whether to delete volumes on destroy.
    Description string
    An optional stack description.
    Environment string
    Environment variables for the stack.
    ServerId string
    The optional server ID.
    environment_id string
    The target environment ID.
    name string
    The Compose stack name.
    source object
    The Compose source configuration.
    app_name string
    The optional deployed stack name.
    compose_type string
    The Compose deployment type.
    create_env_file bool
    Whether to create an environment file.
    delete_volumes_on_destroy bool
    Whether to delete volumes on destroy.
    description string
    An optional stack description.
    environment string
    Environment variables for the stack.
    server_id string
    The optional server ID.
    environmentId String
    The target environment ID.
    name String
    The Compose stack name.
    source ComposeSource
    The Compose source configuration.
    appName String
    The optional deployed stack name.
    composeType String
    The Compose deployment type.
    createEnvFile Boolean
    Whether to create an environment file.
    deleteVolumesOnDestroy Boolean
    Whether to delete volumes on destroy.
    description String
    An optional stack description.
    environment String
    Environment variables for the stack.
    serverId String
    The optional server ID.
    environmentId string
    The target environment ID.
    name string
    The Compose stack name.
    source ComposeSource
    The Compose source configuration.
    appName string
    The optional deployed stack name.
    composeType string
    The Compose deployment type.
    createEnvFile boolean
    Whether to create an environment file.
    deleteVolumesOnDestroy boolean
    Whether to delete volumes on destroy.
    description string
    An optional stack description.
    environment string
    Environment variables for the stack.
    serverId string
    The optional server ID.
    environment_id str
    The target environment ID.
    name str
    The Compose stack name.
    source ComposeSourceArgs
    The Compose source configuration.
    app_name str
    The optional deployed stack name.
    compose_type str
    The Compose deployment type.
    create_env_file bool
    Whether to create an environment file.
    delete_volumes_on_destroy bool
    Whether to delete volumes on destroy.
    description str
    An optional stack description.
    environment str
    Environment variables for the stack.
    server_id str
    The optional server ID.
    environmentId String
    The target environment ID.
    name String
    The Compose stack name.
    source Property Map
    The Compose source configuration.
    appName String
    The optional deployed stack name.
    composeType String
    The Compose deployment type.
    createEnvFile Boolean
    Whether to create an environment file.
    deleteVolumesOnDestroy Boolean
    Whether to delete volumes on destroy.
    description String
    An optional stack description.
    environment String
    Environment variables for the stack.
    serverId String
    The optional server ID.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Compose resource produces the following output properties:

    ComposeId string
    The stable Dokploy Compose ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The current Compose deployment status.
    ComposeId string
    The stable Dokploy Compose ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The current Compose deployment status.
    compose_id string
    The stable Dokploy Compose ID.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The current Compose deployment status.
    composeId String
    The stable Dokploy Compose ID.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The current Compose deployment status.
    composeId string
    The stable Dokploy Compose ID.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The current Compose deployment status.
    compose_id str
    The stable Dokploy Compose ID.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The current Compose deployment status.
    composeId String
    The stable Dokploy Compose ID.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The current Compose deployment status.

    Supporting Types

    ComposeSource, ComposeSourceArgs

    Compose source configuration.
    Type string
    The Compose source type.
    Git Dimeskigj.GitComposeSource
    Git Compose source.
    Gitlab Dimeskigj.GitLabComposeSource
    GitLab Compose source.
    Raw Dimeskigj.RawComposeSource
    Raw Compose source.
    Type string
    The Compose source type.
    Git GitComposeSource
    Git Compose source.
    Gitlab GitLabComposeSource
    GitLab Compose source.
    Raw RawComposeSource
    Raw Compose source.
    type string
    The Compose source type.
    git object
    Git Compose source.
    gitlab object
    GitLab Compose source.
    raw object
    Raw Compose source.
    type String
    The Compose source type.
    git GitComposeSource
    Git Compose source.
    gitlab GitLabComposeSource
    GitLab Compose source.
    raw RawComposeSource
    Raw Compose source.
    type string
    The Compose source type.
    git GitComposeSource
    Git Compose source.
    gitlab GitLabComposeSource
    GitLab Compose source.
    raw RawComposeSource
    Raw Compose source.
    type str
    The Compose source type.
    git GitComposeSource
    Git Compose source.
    gitlab GitLabComposeSource
    GitLab Compose source.
    raw RawComposeSource
    Raw Compose source.
    type String
    The Compose source type.
    git Property Map
    Git Compose source.
    gitlab Property Map
    GitLab Compose source.
    raw Property Map
    Raw Compose source.

    GitComposeSource, GitComposeSourceArgs

    Git Compose source configuration.
    Branch string
    The Git branch.
    Url string
    The Git repository URL.
    ComposePath string
    The Compose file path.
    EnableSubmodules bool
    Whether to enable submodules.
    SshKeyId string
    The SSH key ID.
    WatchPaths List<string>
    Paths to watch.
    Branch string
    The Git branch.
    Url string
    The Git repository URL.
    ComposePath string
    The Compose file path.
    EnableSubmodules bool
    Whether to enable submodules.
    SshKeyId string
    The SSH key ID.
    WatchPaths []string
    Paths to watch.
    branch string
    The Git branch.
    url string
    The Git repository URL.
    compose_path string
    The Compose file path.
    enable_submodules bool
    Whether to enable submodules.
    ssh_key_id string
    The SSH key ID.
    watch_paths list(string)
    Paths to watch.
    branch String
    The Git branch.
    url String
    The Git repository URL.
    composePath String
    The Compose file path.
    enableSubmodules Boolean
    Whether to enable submodules.
    sshKeyId String
    The SSH key ID.
    watchPaths List<String>
    Paths to watch.
    branch string
    The Git branch.
    url string
    The Git repository URL.
    composePath string
    The Compose file path.
    enableSubmodules boolean
    Whether to enable submodules.
    sshKeyId string
    The SSH key ID.
    watchPaths string[]
    Paths to watch.
    branch str
    The Git branch.
    url str
    The Git repository URL.
    compose_path str
    The Compose file path.
    enable_submodules bool
    Whether to enable submodules.
    ssh_key_id str
    The SSH key ID.
    watch_paths Sequence[str]
    Paths to watch.
    branch String
    The Git branch.
    url String
    The Git repository URL.
    composePath String
    The Compose file path.
    enableSubmodules Boolean
    Whether to enable submodules.
    sshKeyId String
    The SSH key ID.
    watchPaths List<String>
    Paths to watch.

    GitLabComposeSource, GitLabComposeSourceArgs

    GitLab Compose source configuration.
    Branch string
    The GitLab branch.
    IntegrationId string
    The GitLab integration ID.
    Namespace string
    The GitLab namespace.
    Owner string
    The GitLab owner.
    ProjectId int
    The GitLab project ID.
    Repository string
    The GitLab repository.
    ComposePath string
    The Compose file path.
    EnableSubmodules bool
    Whether to enable submodules.
    WatchPaths List<string>
    Paths to watch.
    Branch string
    The GitLab branch.
    IntegrationId string
    The GitLab integration ID.
    Namespace string
    The GitLab namespace.
    Owner string
    The GitLab owner.
    ProjectId int
    The GitLab project ID.
    Repository string
    The GitLab repository.
    ComposePath string
    The Compose file path.
    EnableSubmodules bool
    Whether to enable submodules.
    WatchPaths []string
    Paths to watch.
    branch string
    The GitLab branch.
    integration_id string
    The GitLab integration ID.
    namespace string
    The GitLab namespace.
    owner string
    The GitLab owner.
    project_id number
    The GitLab project ID.
    repository string
    The GitLab repository.
    compose_path string
    The Compose file path.
    enable_submodules bool
    Whether to enable submodules.
    watch_paths list(string)
    Paths to watch.
    branch String
    The GitLab branch.
    integrationId String
    The GitLab integration ID.
    namespace String
    The GitLab namespace.
    owner String
    The GitLab owner.
    projectId Integer
    The GitLab project ID.
    repository String
    The GitLab repository.
    composePath String
    The Compose file path.
    enableSubmodules Boolean
    Whether to enable submodules.
    watchPaths List<String>
    Paths to watch.
    branch string
    The GitLab branch.
    integrationId string
    The GitLab integration ID.
    namespace string
    The GitLab namespace.
    owner string
    The GitLab owner.
    projectId number
    The GitLab project ID.
    repository string
    The GitLab repository.
    composePath string
    The Compose file path.
    enableSubmodules boolean
    Whether to enable submodules.
    watchPaths string[]
    Paths to watch.
    branch str
    The GitLab branch.
    integration_id str
    The GitLab integration ID.
    namespace str
    The GitLab namespace.
    owner str
    The GitLab owner.
    project_id int
    The GitLab project ID.
    repository str
    The GitLab repository.
    compose_path str
    The Compose file path.
    enable_submodules bool
    Whether to enable submodules.
    watch_paths Sequence[str]
    Paths to watch.
    branch String
    The GitLab branch.
    integrationId String
    The GitLab integration ID.
    namespace String
    The GitLab namespace.
    owner String
    The GitLab owner.
    projectId Number
    The GitLab project ID.
    repository String
    The GitLab repository.
    composePath String
    The Compose file path.
    enableSubmodules Boolean
    Whether to enable submodules.
    watchPaths List<String>
    Paths to watch.

    RawComposeSource, RawComposeSourceArgs

    Raw Compose source configuration.
    ComposeFile string
    The raw Compose file.
    ComposeFile string
    The raw Compose file.
    compose_file string
    The raw Compose file.
    composeFile String
    The raw Compose file.
    composeFile string
    The raw Compose file.
    compose_file str
    The raw Compose file.
    composeFile String
    The raw Compose file.

    Package Details

    Repository
    dokploy dimeskigj/pulumi-dokploy
    License
    Apache-2.0
    dokploy logo Dokploy
    Viewing docs for Dokploy v0.3.1
    published on Tuesday, Sep 29, 2026 by dimeskigj

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial