# Deploy

- Kind: `class`
- Package: [Aspire.Hosting.Docker](/reference/api/csharp/aspire.hosting.docker.md)
- Version: `13.3.0`
- Namespace: `Aspire.Hosting.Docker.Resources.ServiceNodes.Swarm`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Docker/Resources/ServiceNodes/Swarm/Deploy.cs)

Represents the deployment configuration for a Docker service. This class is used to define various aspects such as replication, mode, resource constraints, updates, and restart policies.

## Definition

```csharp
namespace Aspire.Hosting.Docker.Resources.ServiceNodes.Swarm;

public sealed class Deploy
{
    // ...
}
```

## Constructors

- [Deploy](/reference/api/csharp/aspire.hosting.docker/deploy/constructors.md#constructor)

## Properties

- [Labels](/reference/api/csharp/aspire.hosting.docker/deploy/properties.md#labels) : [LabelSpecs?](/reference/api/csharp/aspire.hosting.docker/labelspecs.md) `get; set` -- Represents the label configurations for a deployable service in Docker.
- [Mode](/reference/api/csharp/aspire.hosting.docker/deploy/properties.md#mode) : `string?` `get; set` -- Gets or sets the deployment mode for the service. Specifies how tasks are scheduled on nodes. Common values include "replicated" for distributing tasks across nodes or "global" for running a task on every node in the cluster.
- [Placement](/reference/api/csharp/aspire.hosting.docker/deploy/properties.md#placement) : [Placement?](/reference/api/csharp/aspire.hosting.docker/placement.md) `get; set` -- Specifies the placement constraints and preferences for service deployment.
- [Replicas](/reference/api/csharp/aspire.hosting.docker/deploy/properties.md#replicas) : `int?` `get; set` -- Represents the number of task replicas for a service node deployment. The replicas define the desired count of independently running instances of the service within the deployment.
- [Resources](/reference/api/csharp/aspire.hosting.docker/deploy/properties.md#resources) : [Resources?](/reference/api/csharp/aspire.hosting.docker/resources.md) `get; set` -- Represents the resource configurations for a deployable service within Docker.
- [RestartPolicy](/reference/api/csharp/aspire.hosting.docker/deploy/properties.md#restartpolicy) : [RestartPolicy?](/reference/api/csharp/aspire.hosting.docker/restartpolicy.md) `get; set` -- Specifies the restart policy for a Docker service.
- [UpdateConfig](/reference/api/csharp/aspire.hosting.docker/deploy/properties.md#updateconfig) : [UpdateConfig?](/reference/api/csharp/aspire.hosting.docker/updateconfig.md) `get; set` -- Represents the update configuration used during service deployments.
