ProjectResource

Handle
📦 Aspire.Hosting v17.0.0
interface ProjectResource
extends IComputeResource,
IContainerFilesDestinationResource,
IDotnetProgramResource,
IResource,
IResourceWithArgs,
IResourceWithEndpoints,
IResourceWithEnvironment,
IResourceWithProbes,
IResourceWithWaitSupport,
IResourceWithServiceDiscovery {
disableForwardedHeaders(): ProjectResource;
publishAsDockerFile(configure?: (obj: ContainerResource) => Promise<void>): ProjectResource;
withEndpointsInEnvironment(endpointNames: string[]): ProjectResource;
withReplicas(replicas: number): ProjectResource;
withVolume(
target: string,
name: string,
env: string,
isReadOnly?: boolean): ProjectResource;
}

Methods

Configures the project to disable forwarded headers when being published.
disableForwardedHeaders(): ProjectResource
ProjectResource
methodpublishAsDockerFilebuilder
Publishes a project as a Docker file with optional container configuration
publishAsDockerFile(configure?: (obj: ContainerResource) => Promise<void>): ProjectResource
configure(obj: ContainerResource) => Promise<void>optionalOptional action to configure the container resource
ProjectResource
Includes only the specified project endpoint names in environment-variable injection.
withEndpointsInEnvironment(endpointNames: string[]): ProjectResource
endpointNamesstring[]The endpoint names to include in environment variables.
ProjectResource
methodwithReplicasbuilder
Configures how many replicas of the project should be created for the project.
withReplicas(replicas: number): ProjectResource
replicasnumberThe number of replicas.
ProjectResource
methodwithVolumebuilder
Adds a volume to a project resource.
withVolume(
target: string,
name: string,
env: string,
isReadOnly?: boolean): ProjectResource
targetstringThe mount path inside the published container.
namestringThe volume name.
envstringThe environment variable that receives the effective volume path.
isReadOnlybooleanoptional= FalseWhether the published volume is read-only.
ProjectResource