diff --git a/platform/src/components/aws/cluster.ts b/platform/src/components/aws/cluster.ts index 44c3b6c8d..77a03a53a 100644 --- a/platform/src/components/aws/cluster.ts +++ b/platform/src/components/aws/cluster.ts @@ -153,31 +153,31 @@ export interface ClusterArgs { vpc: | Vpc | Input<{ - /** - * The ID of the VPC. - */ - id: Input; - /** - * A list of subnet IDs in the VPC to place the load balancer in. - */ - loadBalancerSubnets: Input[]>; - /** - * A list of private subnet IDs in the VPC to place the services in. - */ - serviceSubnets: Input[]>; - /** - * A list of VPC security group IDs for the service. - */ - securityGroups: Input[]>; - /** - * The ID of the Cloud Map namespace to use for the service. - */ - cloudmapNamespaceId: Input; - /** - * The name of the Cloud Map namespace to use for the service. - */ - cloudmapNamespaceName: Input; - }>; + /** + * The ID of the VPC. + */ + id: Input; + /** + * A list of subnet IDs in the VPC to place the load balancer in. + */ + loadBalancerSubnets: Input[]>; + /** + * A list of private subnet IDs in the VPC to place the services in. + */ + serviceSubnets: Input[]>; + /** + * A list of VPC security group IDs for the service. + */ + securityGroups: Input[]>; + /** + * The ID of the Cloud Map namespace to use for the service. + */ + cloudmapNamespaceId: Input; + /** + * The name of the Cloud Map namespace to use for the service. + */ + cloudmapNamespaceName: Input; + }>; /** * Force upgrade from `Cluster.v1` to the latest `Cluster` version. The only valid value * is `v2`, which is the version of the new `Cluster`. @@ -249,44 +249,44 @@ export interface ClusterServiceArgs { * Configure how this component works in `sst dev`. * * :::note - * In `sst dev` your service is run locally; it's not deployed. + * In `sst dev` your service in not deployed. * ::: * - * Instead of deploying your service, this starts it locally. It's run - * as a separate process in the `sst dev` multiplexer. Read more about - * [`sst dev`](/docs/reference/cli/#dev). + * By default, your service in not deployed in `sst dev`. Instead, you can use the + * `dev.command` to start your app locally. It'll be run as a separate process in the + * `sst dev` multiplexer. Read more about [`sst dev`](/docs/reference/cli/#dev). * - * To disable dev mode, pass in `false`. + * To disable dev mode and deploy your service, pass in `false`. */ dev?: | false | { - /** - * The `url` when this is running in dev mode. - * - * Since this component is not deployed in `sst dev`, there is no real URL. But if you are - * using this component's `url` or linking to this component's `url`, it can be useful to - * have a placeholder URL. It avoids having to handle it being `undefined`. - * @default `"http://url-unavailable-in-dev.mode"` - */ - url?: Input; - /** - * The command that `sst dev` runs to start this in dev mode. This is the command you run - * when you want to run your service locally. - */ - command?: Input; - /** - * Configure if you want to automatically start this when `sst dev` starts. You can still - * start it manually later. - * @default `true` - */ - autostart?: Input; - /** - * Change the directory from where the `command` is run. - * @default Uses the `image.dockerfile` path - */ - directory?: Input; - }; + /** + * The `url` when this is running in dev mode. + * + * Since this component is not deployed in `sst dev`, there is no real URL. But if you are + * using this component's `url` or linking to this component's `url`, it can be useful to + * have a placeholder URL. It avoids having to handle it being `undefined`. + * @default `"http://url-unavailable-in-dev.mode"` + */ + url?: Input; + /** + * The command that `sst dev` runs to start this in dev mode. This is the command you run + * when you want to run your service locally. + */ + command?: Input; + /** + * Configure if you want to automatically start this when `sst dev` starts. You can still + * start it manually later. + * @default `true` + */ + autostart?: Input; + /** + * Change the directory from where the `command` is run. + * @default Uses the `image.dockerfile` path + */ + directory?: Input; + }; /** * Configure a public endpoint for the service. When configured, a load balancer * will be created to route traffic to the containers. By default, the endpoint is an @@ -345,105 +345,105 @@ export interface ClusterServiceArgs { domain?: Input< | string | { - /** - * The custom domain you want to use. - * - * @example - * ```js - * { - * domain: { - * name: "example.com" - * } - * } - * ``` - * - * Can also include subdomains based on the current stage. - * - * ```js - * { - * domain: { - * name: `${$app.stage}.example.com` - * } - * } - * ``` - */ - name: Input; - /** - * The ARN of an ACM (AWS Certificate Manager) certificate that proves ownership of the - * domain. By default, a certificate is created and validated automatically. - * - * :::tip - * You need to pass in a `cert` for domains that are not hosted on supported `dns` providers. - * ::: - * - * To manually set up a domain on an unsupported provider, you'll need to: - * - * 1. [Validate that you own the domain](https://docs.aws.amazon.com/acm/latest/userguide/domain-ownership-validation.html) by creating an ACM certificate. You can either validate it by setting a DNS record or by verifying an email sent to the domain owner. - * 2. Once validated, set the certificate ARN as the `cert` and set `dns` to `false`. - * 3. Add the DNS records in your provider to point to the load balancer endpoint. - * - * @example - * ```js - * { - * domain: { - * name: "example.com", - * dns: false, - * cert: "arn:aws:acm:us-east-1:112233445566:certificate/3a958790-8878-4cdc-a396-06d95064cf63" - * } - * } - * ``` - */ - cert?: Input; - /** - * The DNS provider to use for the domain. Defaults to the AWS. - * - * Takes an adapter that can create the DNS records on the provider. This can automate - * validating the domain and setting up the DNS routing. - * - * Supports Route 53, Cloudflare, and Vercel adapters. For other providers, you'll need - * to set `dns` to `false` and pass in a certificate validating ownership via `cert`. - * - * @default `sst.aws.dns` - * - * @example - * - * Specify the hosted zone ID for the Route 53 domain. - * - * ```js - * { - * domain: { - * name: "example.com", - * dns: sst.aws.dns({ - * zone: "Z2FDTNDATAQYW2" - * }) - * } - * } - * ``` - * - * Use a domain hosted on Cloudflare, needs the Cloudflare provider. - * - * ```js - * { - * domain: { - * name: "example.com", - * dns: sst.cloudflare.dns() - * } - * } - * ``` - * - * Use a domain hosted on Vercel, needs the Vercel provider. - * - * ```js - * { - * domain: { - * name: "example.com", - * dns: sst.vercel.dns() - * } - * } - * ``` - */ - dns?: Input; - } + /** + * The custom domain you want to use. + * + * @example + * ```js + * { + * domain: { + * name: "example.com" + * } + * } + * ``` + * + * Can also include subdomains based on the current stage. + * + * ```js + * { + * domain: { + * name: `${$app.stage}.example.com` + * } + * } + * ``` + */ + name: Input; + /** + * The ARN of an ACM (AWS Certificate Manager) certificate that proves ownership of the + * domain. By default, a certificate is created and validated automatically. + * + * :::tip + * You need to pass in a `cert` for domains that are not hosted on supported `dns` providers. + * ::: + * + * To manually set up a domain on an unsupported provider, you'll need to: + * + * 1. [Validate that you own the domain](https://docs.aws.amazon.com/acm/latest/userguide/domain-ownership-validation.html) by creating an ACM certificate. You can either validate it by setting a DNS record or by verifying an email sent to the domain owner. + * 2. Once validated, set the certificate ARN as the `cert` and set `dns` to `false`. + * 3. Add the DNS records in your provider to point to the load balancer endpoint. + * + * @example + * ```js + * { + * domain: { + * name: "example.com", + * dns: false, + * cert: "arn:aws:acm:us-east-1:112233445566:certificate/3a958790-8878-4cdc-a396-06d95064cf63" + * } + * } + * ``` + */ + cert?: Input; + /** + * The DNS provider to use for the domain. Defaults to the AWS. + * + * Takes an adapter that can create the DNS records on the provider. This can automate + * validating the domain and setting up the DNS routing. + * + * Supports Route 53, Cloudflare, and Vercel adapters. For other providers, you'll need + * to set `dns` to `false` and pass in a certificate validating ownership via `cert`. + * + * @default `sst.aws.dns` + * + * @example + * + * Specify the hosted zone ID for the Route 53 domain. + * + * ```js + * { + * domain: { + * name: "example.com", + * dns: sst.aws.dns({ + * zone: "Z2FDTNDATAQYW2" + * }) + * } + * } + * ``` + * + * Use a domain hosted on Cloudflare, needs the Cloudflare provider. + * + * ```js + * { + * domain: { + * name: "example.com", + * dns: sst.cloudflare.dns() + * } + * } + * ``` + * + * Use a domain hosted on Vercel, needs the Vercel provider. + * + * ```js + * { + * domain: { + * name: "example.com", + * dns: sst.vercel.dns() + * } + * } + * ``` + */ + dns?: Input; + } >; /** * Configure the mapping for the ports the public endpoint listens to and forwards to @@ -549,7 +549,7 @@ export interface ClusterServiceArgs { * { * cpu: "1 vCPU" * } - *``` + * ``` */ cpu?: keyof typeof supportedCpus; /** @@ -566,7 +566,7 @@ export interface ClusterServiceArgs { * { * memory: "2 GB" * } - *``` + * ``` */ memory?: `${number} GB`; /** @@ -679,7 +679,7 @@ export interface ClusterServiceArgs { * min: 4 * } * } - *``` + * ``` */ min?: Input; /** @@ -692,7 +692,7 @@ export interface ClusterServiceArgs { * max: 16 * } * } - *``` + * ``` */ max?: Input; /** @@ -706,7 +706,7 @@ export interface ClusterServiceArgs { * cpuUtilization: 50 * } * } - *``` + * ``` */ cpuUtilization?: Input; /** @@ -720,7 +720,7 @@ export interface ClusterServiceArgs { * memoryUtilization: 50 * } * } - *``` + * ``` */ memoryUtilization?: Input; }>; @@ -758,46 +758,46 @@ export interface ClusterServiceArgs { image?: Input< | string | { - /** - * The path to the [Docker build context](https://docs.docker.com/build/building/context/#local-context). The path is relative to your project's `sst.config.ts`. - * @default `"."` - * @example - * - * To change where the Docker build context is located. - * - * ```js - * { - * context: "./app" - * } - * ``` - */ - context?: Input; - /** - * The path to the [Dockerfile](https://docs.docker.com/reference/cli/docker/image/build/#file). - * The path is relative to the build `context`. - * @default `"Dockerfile"` - * @example - * To use a different Dockerfile. - * ```js - * { - * dockerfile: "Dockerfile.prod" - * } - * ``` - */ - dockerfile?: Input; - /** - * Key-value pairs of [build args](https://docs.docker.com/build/guide/build-args/) to pass to the Docker build command. - * @example - * ```js - * { - * args: { - * MY_VAR: "value" - * } - * } - * ``` - */ - args?: Input>>; - } + /** + * The path to the [Docker build context](https://docs.docker.com/build/building/context/#local-context). The path is relative to your project's `sst.config.ts`. + * @default `"."` + * @example + * + * To change where the Docker build context is located. + * + * ```js + * { + * context: "./app" + * } + * ``` + */ + context?: Input; + /** + * The path to the [Dockerfile](https://docs.docker.com/reference/cli/docker/image/build/#file). + * The path is relative to the build `context`. + * @default `"Dockerfile"` + * @example + * To use a different Dockerfile. + * ```js + * { + * dockerfile: "Dockerfile.prod" + * } + * ``` + */ + dockerfile?: Input; + /** + * Key-value pairs of [build args](https://docs.docker.com/build/guide/build-args/) to pass to the Docker build command. + * @example + * ```js + * { + * args: { + * MY_VAR: "value" + * } + * } + * ``` + */ + args?: Input>>; + } >; /** * The command to override the default command in the container. @@ -899,15 +899,15 @@ export interface ClusterServiceArgs { efs: Input< | Efs | { - /** - * The ID of the EFS file system. - */ - fileSystem: Input; - /** - * The ID of the EFS access point. - */ - accessPoint: Input; - } + /** + * The ID of the EFS file system. + */ + fileSystem: Input; + /** + * The ID of the EFS access point. + */ + accessPoint: Input; + } >; /** * The path to mount the volumne. @@ -976,21 +976,21 @@ export interface ClusterServiceArgs { image?: Input< | string | { - /** - * The path to the Docker build context. Same as the top-level - * [`image.context`](#image-context). - */ - context?: Input; - /** - * The path to the Dockerfile. Same as the top-level - * [`image.dockerfile`](#image-dockerfile). - */ - dockerfile?: Input; - /** - * Key-value pairs of build args. Same as the top-level [`image.args`](#image-args). - */ - args?: Input>>; - } + /** + * The path to the Docker build context. Same as the top-level + * [`image.context`](#image-context). + */ + context?: Input; + /** + * The path to the Dockerfile. Same as the top-level + * [`image.dockerfile`](#image-dockerfile). + */ + dockerfile?: Input; + /** + * Key-value pairs of build args. Same as the top-level [`image.args`](#image-args). + */ + args?: Input>>; + } >; /** * The command to override the default command in the container. Same as the top-level @@ -1193,12 +1193,6 @@ export interface ClusterServiceArgs { * * console.log(Resource.MyBucket.name); * ``` - * - * #### Running in dev - * - * When running `sst dev` the cluster service will not be created. - * Use the `dev.command` argument to start a local docker container. - * */ export class Cluster extends Component { private constructorArgs: ClusterArgs; @@ -1225,7 +1219,9 @@ export class Cluster extends Component { ` - Set \`forceUpgrade: "v${_version}"\` on the "Cluster" component. Learn more https://sst.dev/docs/component/aws/cluster#forceupgrade`, ``, `To continue using v${$cli.state.version[name]}:`, - ` - Rename "Cluster" to "Cluster.v${$cli.state.version[name]}". Learn more about versioning - https://sst.dev/docs/components/#versioning`, + ` - Rename "Cluster" to "Cluster.v${ + $cli.state.version[name] + }". Learn more about versioning - https://sst.dev/docs/components/#versioning`, ].join("\n"), _forceUpgrade: args.forceUpgrade, }); diff --git a/www/src/content/docs/docs/start/aws/astro.mdx b/www/src/content/docs/docs/start/aws/astro.mdx index 2f264a661..3fe8acc03 100644 --- a/www/src/content/docs/docs/start/aws/astro.mdx +++ b/www/src/content/docs/docs/start/aws/astro.mdx @@ -291,7 +291,11 @@ async run() { This creates a VPC with a bastion host, an ECS Cluster, and adds a Fargate service to it. -The `dev.command` tells SST to run our Astro site locally in dev mode. +:::note +By default, your service in not deployed when running in _dev_. +::: + +The `dev.command` tells SST to instead run our Astro site locally in dev mode. --- diff --git a/www/src/content/docs/docs/start/aws/bun.mdx b/www/src/content/docs/docs/start/aws/bun.mdx index 24d9a50cd..1b2a543d9 100644 --- a/www/src/content/docs/docs/start/aws/bun.mdx +++ b/www/src/content/docs/docs/start/aws/bun.mdx @@ -98,7 +98,11 @@ async run() { This creates a VPC with a bastion host, an ECS Cluster, and adds a Fargate service to it. -The `dev.command` tells SST to run our Bun app locally in dev mode. +:::note +By default, your service in not deployed when running in _dev_. +::: + +The `dev.command` tells SST to instead run our Bun app locally in dev mode. --- diff --git a/www/src/content/docs/docs/start/aws/express.mdx b/www/src/content/docs/docs/start/aws/express.mdx index 6d761471b..7a56e2645 100644 --- a/www/src/content/docs/docs/start/aws/express.mdx +++ b/www/src/content/docs/docs/start/aws/express.mdx @@ -82,7 +82,11 @@ async run() { This creates a VPC with a bastion host, an ECS Cluster, and adds a Fargate service to it. -The `dev.command` tells SST to run our Express app locally in dev mode. +:::note +By default, your service in not deployed when running in _dev_. +::: + +The `dev.command` tells SST to instead run our Express app locally in dev mode. --- diff --git a/www/src/content/docs/docs/start/aws/nextjs.mdx b/www/src/content/docs/docs/start/aws/nextjs.mdx index 6d1ca360e..249f12aac 100644 --- a/www/src/content/docs/docs/start/aws/nextjs.mdx +++ b/www/src/content/docs/docs/start/aws/nextjs.mdx @@ -291,7 +291,11 @@ async run() { This creates a VPC with a bastion host, an ECS Cluster, and adds a Fargate service to it. -The `dev.command` tells SST to run our Next.js app locally in dev mode. +:::note +By default, your service in not deployed when running in _dev_. +::: + +The `dev.command` tells SST to instead run our Next.js app locally in dev mode. --- diff --git a/www/src/content/docs/docs/start/aws/nuxt.mdx b/www/src/content/docs/docs/start/aws/nuxt.mdx index 620f0a34f..5830554dd 100644 --- a/www/src/content/docs/docs/start/aws/nuxt.mdx +++ b/www/src/content/docs/docs/start/aws/nuxt.mdx @@ -253,7 +253,11 @@ async run() { This creates a VPC with a bastion host, an ECS Cluster, and adds a Fargate service to it. -The `dev.command` tells SST to run our Nuxt app locally in dev mode. +:::note +By default, your service in not deployed when running in _dev_. +::: + +The `dev.command` tells SST to instead run our Nuxt app locally in dev mode. --- diff --git a/www/src/content/docs/docs/start/aws/remix.mdx b/www/src/content/docs/docs/start/aws/remix.mdx index b760efea0..ca5b501fd 100644 --- a/www/src/content/docs/docs/start/aws/remix.mdx +++ b/www/src/content/docs/docs/start/aws/remix.mdx @@ -247,7 +247,11 @@ async run() { This creates a VPC with a bastion host, an ECS Cluster, and adds a Fargate service to it. -The `dev.command` tells SST to run our Remix app locally in dev mode. +:::note +By default, your service in not deployed when running in _dev_. +::: + +The `dev.command` tells SST to instead run our Remix app locally in dev mode. --- diff --git a/www/src/content/docs/docs/start/aws/solid.mdx b/www/src/content/docs/docs/start/aws/solid.mdx index 2d6710ab5..9bfe107fb 100644 --- a/www/src/content/docs/docs/start/aws/solid.mdx +++ b/www/src/content/docs/docs/start/aws/solid.mdx @@ -269,7 +269,11 @@ async run() { This creates a VPC with a bastion host, an ECS Cluster, and adds a Fargate service to it. -The `dev.command` tells SST to run our SolidStart app locally in dev mode. +:::note +By default, your service in not deployed when running in _dev_. +::: + +The `dev.command` tells SST to instead run our SolidStart app locally in dev mode. --- diff --git a/www/src/content/docs/docs/start/aws/svelte.mdx b/www/src/content/docs/docs/start/aws/svelte.mdx index 8b11fd25d..04b1ddf2c 100644 --- a/www/src/content/docs/docs/start/aws/svelte.mdx +++ b/www/src/content/docs/docs/start/aws/svelte.mdx @@ -278,7 +278,11 @@ async run() { This creates a VPC with a bastion host, an ECS Cluster, and adds a Fargate service to it. -The `dev.command` tells SST to run our SvelteKit app locally in dev mode. +:::note +By default, your service in not deployed when running in _dev_. +::: + +The `dev.command` tells SST to instead run our SvelteKit app locally in dev mode. ---