// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; import * as utilities from "./utilities"; export class Compose extends pulumi.CustomResource { /** * Get an existing Compose resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ public static get(name: string, id: pulumi.Input, state?: ComposeState, opts?: pulumi.CustomResourceOptions): Compose { return new Compose(name, state, { ...opts, id: id }); } /** @internal */ public static readonly __pulumiType = 'dokploy:index/compose:Compose'; /** * Returns true if the given object is an instance of Compose. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ public static isInstance(obj: any): obj is Compose { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === Compose.__pulumiType; } /** * Unique Docker stack name. Generated by Dokploy when omitted. Changing it forces a new stack. */ declare public readonly appName: pulumi.Output; /** * Deploy automatically when the configured trigger fires. */ declare public readonly autoDeploy: pulumi.Output; /** * Bitbucket branch to deploy. */ declare public readonly bitbucketBranch: pulumi.Output; /** * ID of the configured Bitbucket provider connection. */ declare public readonly bitbucketId: pulumi.Output; /** * Bitbucket repository owner. */ declare public readonly bitbucketOwner: pulumi.Output; /** * Bitbucket repository name. */ declare public readonly bitbucketRepository: pulumi.Output; /** * Bitbucket repository slug. */ declare public readonly bitbucketRepositorySlug: pulumi.Output; /** * GitHub branch to deploy. */ declare public readonly branch: pulumi.Output; /** * Custom `docker compose` command to run. */ declare public readonly command: pulumi.Output; /** * Inline Compose file contents. Used when `sourceType` is `raw`. */ declare public readonly composeFile: pulumi.Output; /** * Path to the Compose file within the repository. */ declare public readonly composePath: pulumi.Output; /** * Current status reported by Dokploy: `idle`, `running`, `done` or `error`. */ declare public /*out*/ readonly composeStatus: pulumi.Output; /** * Whether to run the stack with Docker Compose or Docker Swarm. Valid values: `docker-compose`, `stack`. */ declare public readonly composeType: pulumi.Output; /** * RFC 3339 timestamp of when the stack was created. */ declare public /*out*/ readonly createdAt: pulumi.Output; /** * Branch to deploy for a custom Git remote. */ declare public readonly customGitBranch: pulumi.Output; /** * SSH key used to clone a private custom Git remote. */ declare public readonly customGitSshKeyId: pulumi.Output; /** * Git remote URL, when `sourceType` is `git`. */ declare public readonly customGitUrl: pulumi.Output; /** * Whether to delete the stack's Docker volumes when this resource is destroyed. Defaults to `false`, which preserves the data. */ declare public readonly deleteVolumes: pulumi.Output; /** * Free-form description. */ declare public readonly description: pulumi.Output; /** * Clone Git submodules when checking out the repository. */ declare public readonly enableSubmodules: pulumi.Output; /** * Environment variables in `KEY=value` format, one per line. */ declare public readonly env: pulumi.Output; /** * Environment this stack belongs to. */ declare public readonly environmentId: pulumi.Output; /** * Gitea branch to deploy. */ declare public readonly giteaBranch: pulumi.Output; /** * ID of the configured Gitea provider connection. */ declare public readonly giteaId: pulumi.Output; /** * Gitea repository owner. */ declare public readonly giteaOwner: pulumi.Output; /** * Gitea repository name. */ declare public readonly giteaRepository: pulumi.Output; /** * ID of the configured GitHub provider connection. */ declare public readonly githubId: pulumi.Output; /** * GitLab branch to deploy. */ declare public readonly gitlabBranch: pulumi.Output; /** * ID of the configured GitLab provider connection. */ declare public readonly gitlabId: pulumi.Output; /** * GitLab repository owner. */ declare public readonly gitlabOwner: pulumi.Output; /** * Full GitLab namespace path. */ declare public readonly gitlabPathNamespace: pulumi.Output; /** * Numeric GitLab project ID. */ declare public readonly gitlabProjectId: pulumi.Output; /** * GitLab repository name. */ declare public readonly gitlabRepository: pulumi.Output; /** * Run the stack on its own isolated Docker network. */ declare public readonly isolatedDeployment: pulumi.Output; /** * Prefix volume names for isolated deployments. Retained for backwards compatibility. */ declare public readonly isolatedDeploymentsVolume: pulumi.Output; /** * Display name of the stack. */ declare public readonly name: pulumi.Output; /** * GitHub repository owner. */ declare public readonly owner: pulumi.Output; /** * Append a random suffix to service and volume names. */ declare public readonly randomize: pulumi.Output; /** * GitHub repository name. */ declare public readonly repository: pulumi.Output; /** * Remote server to deploy on. Omit to use the Dokploy host itself. */ declare public readonly serverId: pulumi.Output; /** * Where the Compose file comes from. Valid values: `git`, `github`, `gitlab`, `bitbucket`, `gitea`, `raw`. */ declare public readonly sourceType: pulumi.Output; /** * Suffix appended to generated resource names. */ declare public readonly suffix: pulumi.Output; /** * What triggers an automatic deployment. Valid values: `push`, `tag`. */ declare public readonly triggerType: pulumi.Output; /** * Glob patterns that limit which changed paths trigger an automatic deployment. */ declare public readonly watchPaths: pulumi.Output; /** * Create a Compose resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ComposeArgs, opts?: pulumi.CustomResourceOptions) constructor(name: string, argsOrState?: ComposeArgs | ComposeState, opts?: pulumi.CustomResourceOptions) { let resourceInputs: pulumi.Inputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState as ComposeState | undefined; resourceInputs["appName"] = state?.appName; resourceInputs["autoDeploy"] = state?.autoDeploy; resourceInputs["bitbucketBranch"] = state?.bitbucketBranch; resourceInputs["bitbucketId"] = state?.bitbucketId; resourceInputs["bitbucketOwner"] = state?.bitbucketOwner; resourceInputs["bitbucketRepository"] = state?.bitbucketRepository; resourceInputs["bitbucketRepositorySlug"] = state?.bitbucketRepositorySlug; resourceInputs["branch"] = state?.branch; resourceInputs["command"] = state?.command; resourceInputs["composeFile"] = state?.composeFile; resourceInputs["composePath"] = state?.composePath; resourceInputs["composeStatus"] = state?.composeStatus; resourceInputs["composeType"] = state?.composeType; resourceInputs["createdAt"] = state?.createdAt; resourceInputs["customGitBranch"] = state?.customGitBranch; resourceInputs["customGitSshKeyId"] = state?.customGitSshKeyId; resourceInputs["customGitUrl"] = state?.customGitUrl; resourceInputs["deleteVolumes"] = state?.deleteVolumes; resourceInputs["description"] = state?.description; resourceInputs["enableSubmodules"] = state?.enableSubmodules; resourceInputs["env"] = state?.env; resourceInputs["environmentId"] = state?.environmentId; resourceInputs["giteaBranch"] = state?.giteaBranch; resourceInputs["giteaId"] = state?.giteaId; resourceInputs["giteaOwner"] = state?.giteaOwner; resourceInputs["giteaRepository"] = state?.giteaRepository; resourceInputs["githubId"] = state?.githubId; resourceInputs["gitlabBranch"] = state?.gitlabBranch; resourceInputs["gitlabId"] = state?.gitlabId; resourceInputs["gitlabOwner"] = state?.gitlabOwner; resourceInputs["gitlabPathNamespace"] = state?.gitlabPathNamespace; resourceInputs["gitlabProjectId"] = state?.gitlabProjectId; resourceInputs["gitlabRepository"] = state?.gitlabRepository; resourceInputs["isolatedDeployment"] = state?.isolatedDeployment; resourceInputs["isolatedDeploymentsVolume"] = state?.isolatedDeploymentsVolume; resourceInputs["name"] = state?.name; resourceInputs["owner"] = state?.owner; resourceInputs["randomize"] = state?.randomize; resourceInputs["repository"] = state?.repository; resourceInputs["serverId"] = state?.serverId; resourceInputs["sourceType"] = state?.sourceType; resourceInputs["suffix"] = state?.suffix; resourceInputs["triggerType"] = state?.triggerType; resourceInputs["watchPaths"] = state?.watchPaths; } else { const args = argsOrState as ComposeArgs | undefined; if (args?.environmentId === undefined && !opts.urn) { throw new Error("Missing required property 'environmentId'"); } resourceInputs["appName"] = args?.appName; resourceInputs["autoDeploy"] = args?.autoDeploy; resourceInputs["bitbucketBranch"] = args?.bitbucketBranch; resourceInputs["bitbucketId"] = args?.bitbucketId; resourceInputs["bitbucketOwner"] = args?.bitbucketOwner; resourceInputs["bitbucketRepository"] = args?.bitbucketRepository; resourceInputs["bitbucketRepositorySlug"] = args?.bitbucketRepositorySlug; resourceInputs["branch"] = args?.branch; resourceInputs["command"] = args?.command; resourceInputs["composeFile"] = args?.composeFile; resourceInputs["composePath"] = args?.composePath; resourceInputs["composeType"] = args?.composeType; resourceInputs["customGitBranch"] = args?.customGitBranch; resourceInputs["customGitSshKeyId"] = args?.customGitSshKeyId; resourceInputs["customGitUrl"] = args?.customGitUrl; resourceInputs["deleteVolumes"] = args?.deleteVolumes; resourceInputs["description"] = args?.description; resourceInputs["enableSubmodules"] = args?.enableSubmodules; resourceInputs["env"] = args?.env; resourceInputs["environmentId"] = args?.environmentId; resourceInputs["giteaBranch"] = args?.giteaBranch; resourceInputs["giteaId"] = args?.giteaId; resourceInputs["giteaOwner"] = args?.giteaOwner; resourceInputs["giteaRepository"] = args?.giteaRepository; resourceInputs["githubId"] = args?.githubId; resourceInputs["gitlabBranch"] = args?.gitlabBranch; resourceInputs["gitlabId"] = args?.gitlabId; resourceInputs["gitlabOwner"] = args?.gitlabOwner; resourceInputs["gitlabPathNamespace"] = args?.gitlabPathNamespace; resourceInputs["gitlabProjectId"] = args?.gitlabProjectId; resourceInputs["gitlabRepository"] = args?.gitlabRepository; resourceInputs["isolatedDeployment"] = args?.isolatedDeployment; resourceInputs["isolatedDeploymentsVolume"] = args?.isolatedDeploymentsVolume; resourceInputs["name"] = args?.name; resourceInputs["owner"] = args?.owner; resourceInputs["randomize"] = args?.randomize; resourceInputs["repository"] = args?.repository; resourceInputs["serverId"] = args?.serverId; resourceInputs["sourceType"] = args?.sourceType; resourceInputs["suffix"] = args?.suffix; resourceInputs["triggerType"] = args?.triggerType; resourceInputs["watchPaths"] = args?.watchPaths; resourceInputs["composeStatus"] = undefined /*out*/; resourceInputs["createdAt"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Compose.__pulumiType, name, resourceInputs, opts); } } /** * Input properties used for looking up and filtering Compose resources. */ export interface ComposeState { /** * Unique Docker stack name. Generated by Dokploy when omitted. Changing it forces a new stack. */ appName?: pulumi.Input; /** * Deploy automatically when the configured trigger fires. */ autoDeploy?: pulumi.Input; /** * Bitbucket branch to deploy. */ bitbucketBranch?: pulumi.Input; /** * ID of the configured Bitbucket provider connection. */ bitbucketId?: pulumi.Input; /** * Bitbucket repository owner. */ bitbucketOwner?: pulumi.Input; /** * Bitbucket repository name. */ bitbucketRepository?: pulumi.Input; /** * Bitbucket repository slug. */ bitbucketRepositorySlug?: pulumi.Input; /** * GitHub branch to deploy. */ branch?: pulumi.Input; /** * Custom `docker compose` command to run. */ command?: pulumi.Input; /** * Inline Compose file contents. Used when `sourceType` is `raw`. */ composeFile?: pulumi.Input; /** * Path to the Compose file within the repository. */ composePath?: pulumi.Input; /** * Current status reported by Dokploy: `idle`, `running`, `done` or `error`. */ composeStatus?: pulumi.Input; /** * Whether to run the stack with Docker Compose or Docker Swarm. Valid values: `docker-compose`, `stack`. */ composeType?: pulumi.Input; /** * RFC 3339 timestamp of when the stack was created. */ createdAt?: pulumi.Input; /** * Branch to deploy for a custom Git remote. */ customGitBranch?: pulumi.Input; /** * SSH key used to clone a private custom Git remote. */ customGitSshKeyId?: pulumi.Input; /** * Git remote URL, when `sourceType` is `git`. */ customGitUrl?: pulumi.Input; /** * Whether to delete the stack's Docker volumes when this resource is destroyed. Defaults to `false`, which preserves the data. */ deleteVolumes?: pulumi.Input; /** * Free-form description. */ description?: pulumi.Input; /** * Clone Git submodules when checking out the repository. */ enableSubmodules?: pulumi.Input; /** * Environment variables in `KEY=value` format, one per line. */ env?: pulumi.Input; /** * Environment this stack belongs to. */ environmentId?: pulumi.Input; /** * Gitea branch to deploy. */ giteaBranch?: pulumi.Input; /** * ID of the configured Gitea provider connection. */ giteaId?: pulumi.Input; /** * Gitea repository owner. */ giteaOwner?: pulumi.Input; /** * Gitea repository name. */ giteaRepository?: pulumi.Input; /** * ID of the configured GitHub provider connection. */ githubId?: pulumi.Input; /** * GitLab branch to deploy. */ gitlabBranch?: pulumi.Input; /** * ID of the configured GitLab provider connection. */ gitlabId?: pulumi.Input; /** * GitLab repository owner. */ gitlabOwner?: pulumi.Input; /** * Full GitLab namespace path. */ gitlabPathNamespace?: pulumi.Input; /** * Numeric GitLab project ID. */ gitlabProjectId?: pulumi.Input; /** * GitLab repository name. */ gitlabRepository?: pulumi.Input; /** * Run the stack on its own isolated Docker network. */ isolatedDeployment?: pulumi.Input; /** * Prefix volume names for isolated deployments. Retained for backwards compatibility. */ isolatedDeploymentsVolume?: pulumi.Input; /** * Display name of the stack. */ name?: pulumi.Input; /** * GitHub repository owner. */ owner?: pulumi.Input; /** * Append a random suffix to service and volume names. */ randomize?: pulumi.Input; /** * GitHub repository name. */ repository?: pulumi.Input; /** * Remote server to deploy on. Omit to use the Dokploy host itself. */ serverId?: pulumi.Input; /** * Where the Compose file comes from. Valid values: `git`, `github`, `gitlab`, `bitbucket`, `gitea`, `raw`. */ sourceType?: pulumi.Input; /** * Suffix appended to generated resource names. */ suffix?: pulumi.Input; /** * What triggers an automatic deployment. Valid values: `push`, `tag`. */ triggerType?: pulumi.Input; /** * Glob patterns that limit which changed paths trigger an automatic deployment. */ watchPaths?: pulumi.Input[]>; } /** * The set of arguments for constructing a Compose resource. */ export interface ComposeArgs { /** * Unique Docker stack name. Generated by Dokploy when omitted. Changing it forces a new stack. */ appName?: pulumi.Input; /** * Deploy automatically when the configured trigger fires. */ autoDeploy?: pulumi.Input; /** * Bitbucket branch to deploy. */ bitbucketBranch?: pulumi.Input; /** * ID of the configured Bitbucket provider connection. */ bitbucketId?: pulumi.Input; /** * Bitbucket repository owner. */ bitbucketOwner?: pulumi.Input; /** * Bitbucket repository name. */ bitbucketRepository?: pulumi.Input; /** * Bitbucket repository slug. */ bitbucketRepositorySlug?: pulumi.Input; /** * GitHub branch to deploy. */ branch?: pulumi.Input; /** * Custom `docker compose` command to run. */ command?: pulumi.Input; /** * Inline Compose file contents. Used when `sourceType` is `raw`. */ composeFile?: pulumi.Input; /** * Path to the Compose file within the repository. */ composePath?: pulumi.Input; /** * Whether to run the stack with Docker Compose or Docker Swarm. Valid values: `docker-compose`, `stack`. */ composeType?: pulumi.Input; /** * Branch to deploy for a custom Git remote. */ customGitBranch?: pulumi.Input; /** * SSH key used to clone a private custom Git remote. */ customGitSshKeyId?: pulumi.Input; /** * Git remote URL, when `sourceType` is `git`. */ customGitUrl?: pulumi.Input; /** * Whether to delete the stack's Docker volumes when this resource is destroyed. Defaults to `false`, which preserves the data. */ deleteVolumes?: pulumi.Input; /** * Free-form description. */ description?: pulumi.Input; /** * Clone Git submodules when checking out the repository. */ enableSubmodules?: pulumi.Input; /** * Environment variables in `KEY=value` format, one per line. */ env?: pulumi.Input; /** * Environment this stack belongs to. */ environmentId: pulumi.Input; /** * Gitea branch to deploy. */ giteaBranch?: pulumi.Input; /** * ID of the configured Gitea provider connection. */ giteaId?: pulumi.Input; /** * Gitea repository owner. */ giteaOwner?: pulumi.Input; /** * Gitea repository name. */ giteaRepository?: pulumi.Input; /** * ID of the configured GitHub provider connection. */ githubId?: pulumi.Input; /** * GitLab branch to deploy. */ gitlabBranch?: pulumi.Input; /** * ID of the configured GitLab provider connection. */ gitlabId?: pulumi.Input; /** * GitLab repository owner. */ gitlabOwner?: pulumi.Input; /** * Full GitLab namespace path. */ gitlabPathNamespace?: pulumi.Input; /** * Numeric GitLab project ID. */ gitlabProjectId?: pulumi.Input; /** * GitLab repository name. */ gitlabRepository?: pulumi.Input; /** * Run the stack on its own isolated Docker network. */ isolatedDeployment?: pulumi.Input; /** * Prefix volume names for isolated deployments. Retained for backwards compatibility. */ isolatedDeploymentsVolume?: pulumi.Input; /** * Display name of the stack. */ name?: pulumi.Input; /** * GitHub repository owner. */ owner?: pulumi.Input; /** * Append a random suffix to service and volume names. */ randomize?: pulumi.Input; /** * GitHub repository name. */ repository?: pulumi.Input; /** * Remote server to deploy on. Omit to use the Dokploy host itself. */ serverId?: pulumi.Input; /** * Where the Compose file comes from. Valid values: `git`, `github`, `gitlab`, `bitbucket`, `gitea`, `raw`. */ sourceType?: pulumi.Input; /** * Suffix appended to generated resource names. */ suffix?: pulumi.Input; /** * What triggers an automatic deployment. Valid values: `push`, `tag`. */ triggerType?: pulumi.Input; /** * Glob patterns that limit which changed paths trigger an automatic deployment. */ watchPaths?: pulumi.Input[]>; }