🎥 Make videos programmatically with React
Cloud Run and Lambda Docs: Make 1 documentation page for each command
Jonny Burgerabff55e56dc2
diff --git a/packages/docs/docs/cloudrun/cli/services.mdx b/packages/docs/docs/cloudrun/cli/services.mdxindex b13270d912..cfcb575b10 100644--- a/packages/docs/docs/cloudrun/cli/services.mdx+++ b/packages/docs/docs/cloudrun/cli/services.mdx@@ -9,287 +9,20 @@ crumb: 'Cloud Run CLI Reference'<ExperimentalBadge><p>- Cloud Run is in <a href="/docs/cloudrun-alpha">Alpha</a>, which means APIs- may change in any version and documentation is not yet finished. See the{' '}- <a href="https://remotion.dev/changelog">- changelog to stay up to date with breaking changes- </a>- .+ Cloud Run is in <a href="/docs/cloudrun-alpha">Alpha</a>, which means APIs may change in any version and documentation is not yet finished. See the <a href="https://remotion.dev/changelog">changelog to stay up to date with breaking changes</a>.</p></ExperimentalBadge>The `npx remotion cloudrun services` command allows you to deploy, view and delete GCP Cloud Run services that can render videos and stills.-- [`deploy`](#deploy)-- [`ls`](#ls)-- [`rm`](#rm)-- [`rmall`](#rmall)+## Subcommands-You only need one service per GCP region and Remotion version.--## deploy--```-npx remotion cloudrun services deploy-```--Creates a new service in your GCP project. If a service exists in the same region, with the same Remotion version, with the same amount of memory, disk space and timeout duration, the name of the already deployed service will be returned instead.--<details>- <summary>Example output</summary>- <pre>- Validating Deployment of Cloud Run Service:- <br />- <br />- Remotion Version: 3.3.95- <br />- Memory Limit: 2Gi- <br />- CPU Limit: 1.0- <br />- Timeout: 300- <br />- Project Name: remotion-example- <br />- Region: us-east1- <br />- <br />- Deploying Cloud Run Service...- <br />- <br />- <br />- Cloud Run Deployed!- <br />- <br />- Service name: remotion--3-3-95--mem512mi--cpu2--t-1200- <br />- Version: 3.3.95- <br />- CPU Limit: 2<br />- Memory Limit: 512Mi- <br />- Timeout: 1200sec- <br />- Region: us-east1- <br />- Service URL:- https://remotion--3-3-95--mem512mi--cpu2--t-1200-1a2b3c4d5e-ue.a.run.app- <br />- GCP Console URL:- https://console.cloud.google.com/run/detail/us-east1/remotion--3-3-95--mem512mi--cpu2--t-1200/logs- <br />- <br />- </pre>-</details>--### `--region`--The [GCP region](/docs/cloudrun/region-selection) to select. The site that the service will be accessing should also be in this same region to minimise latency.--### `--memoryLimit`--The upper bound on the amount of RAM that the Cloud Run service can consume. Default: 2 GB.--### `--cpuLimit`--The maximum number of CPU cores that the Cloud Run service can use to process requests. Default: 1.0.--### `--minInstances`--The minimum number of service instances to have available, regardless of requests. Default: 0.--:::note-Any running instances, even if they are not performing a render, will be billable in GCP. The default minimum number of instances is zero, which means that when no requests are made to your service, you are not billed.-:::--### `--maxInstances`--The maximum number of service instances that can be create by GCP in response to incoming requests. Default: 100.--### `--timeoutSeconds`--Timeout of the Cloud Run service. Default: 300 seconds.--:::info-Not to be confused with the [`--timeout` flag when rendering which defines the timeout for `delayRender()`](/docs/cli/render#--timeout).-:::--### `--onlyAllocateCpuDuringRequestProcessing`<AvailableFrom v="4.0.221" />--If this is set to true, `cpu_idle` will be set to `true` in the service manifest.-CPU alloction will be disabled while no request is being processed, which can lead to significant cost savings.--### `--quiet`, `-q`--Only logs the service name, and 'Authenticated access granted'.--## ls+- [`deploy`](/docs/cloudrun/cli/services/deploy) - Creates a new service in your GCP project+- [`ls`](/docs/cloudrun/cli/services/ls) - Lists the services deployed to GCP in a region+- [`rm`](/docs/cloudrun/cli/services/rm) - Removes one or more services from your GCP project+- [`rmall`](/docs/cloudrun/cli/services/rmall) - Removes all services from your GCP project for a region-```-npx remotion cloudrun services ls-```--Lists the services that you have deployed to GCP in the [selected region](/docs/cloudrun/region-selection).--<details>- <summary>Example output</summary>- <pre>- 2 services in us-east1- <br />- <br />- Service name: remotion--3-3-95--mem512mi--cpu2--t-1200- <br />- Version: 3.3.95- <br />- CPU Limit: 2<br />- Memory Limit: 512Mi- <br />- Timeout: 1200sec- <br />- Region: us-east1- <br />- Service URL:- https://remotion--3-3-95--mem512mi--cpu2--t-1200-1a2b3c4d5e-ue.a.run.app- <br />- GCP Console URL:- https://console.cloud.google.com/run/detail/us-east1/remotion--3-3-95--mem512mi--cpu2--t-1200/logs- <br />- <br />- Service name: remotion--3-3-82--mem512mi--cpu1-0--t-800- <br />- Version: 3.3.82- <br />- CPU Limit: 1.0- <br />- Memory Limit: 512Mi- <br />- Timeout: 800sec- <br />- Region: us-east1- <br />- Service URL:- https://remotion--3-3-82--mem512mi--cpu1-0--t-800-1a2b3c4d5e-ue.a.run.app- <br />- GCP Console URL:- https://console.cloud.google.com/run/detail/us-east1/remotion--3-3-82--mem512mi--cpu1-0--t-800/logs- <br />- <br />- </pre>-</details>--### `--region`--The [GCP region](/docs/cloudrun/region-selection) to list services from.--### `--quiet`, `-q`--Prints only the service names in a space-separated list. If no services exist, prints `()`--## rm--```-npx remotion cloudrun services rm remotion--3-3-82--mem512mi--cpu1-0--t-800-```--Removes one or more services from your GCP project. Pass a space-separated list of services you'd like to delete.--<details>-<summary>-Example output-</summary>-<pre>-<br/>-Service name: remotion--3-3-82--mem2gi--cpu1-0--t-800<br/>-Version: 3.3.82<br/>-CPU Limit: 1.0<br/>-Memory Limit: 2Gi<br/>-Timeout: 300sec<br/>-Region: us-east1<br/>-Service URL: https://remotion--3-3-82--mem2gi--cpu1-0--t-800-1a2b3c4d5e-ue.a.run.app<br/>-GCP Console URL: https://console.cloud.google.com/run/detail/us-east1/remotion--3-3-82--mem2gi--cpu1-0--t-800/logs-Delete? (Y/n): Y<br/>-Deleted!-<br/>--</pre>-</details>--### `--region`--The [GCP region](/docs/cloudrun/region-selection) to select.--### `--yes`, `-y`--Skips confirmation.--## rmall--```-npx remotion cloudrun services rmall-```--Removes all services from your GCP project for a certain region.--<details>- <summary>Example output</summary>- <pre>- 2 services in us-east1- <br />- <br />- Service name: remotion--3-3-95--mem512mi--cpu2--t-1200- <br />- Version: 3.3.95- <br />- CPU Limit: 2<br />- Memory Limit: 512Mi- <br />- Timeout: 1200sec- <br />- Region: us-east1- <br />- Service URL:- https://remotion--3-3-95--mem512mi--cpu2--t-1200-1a2b3c4d5e-ue.a.run.app- <br />- GCP Console URL:- https://console.cloud.google.com/run/detail/us-east1/remotion--3-3-95--mem512mi--cpu2--t-1200/logs- <br />- <br />- Delete? (Y/n) n<br />- Skipping service - remotion--3-3-95--mem512mi--cpu2--t-1200.- <br />- <br />- Service name: remotion--3-3-82--mem512mi--cpu1-0--t-800- <br />- Version: 3.3.82- <br />- CPU Limit: 1.0- <br />- Memory Limit: 512Mi- <br />- Timeout: 800sec- <br />- Region: us-east1- <br />- Service URL:- https://remotion--3-3-82--mem512mi--cpu1-0--t-800-1a2b3c4d5e-ue.a.run.app- <br />- GCP Console URL:- https://console.cloud.google.com/run/detail/us-east1/remotion--3-3-82--mem512mi--cpu1-0--t-800/logs- <br />- <br />- Delete? (Y/n) n<br />- Skipping service - remotion--3-3-82--mem512mi--cpu1-0--t-800.- <br />- </pre>-</details>--### `--region`--The [GCP region](/docs/cloudrun/region-selection) to remove services from.--### `--yes`, `-y`--Skips confirmation.+You only need one service per GCP region and Remotion version.## See alsodiff --git a/packages/docs/docs/cloudrun/cli/services/deploy.mdx b/packages/docs/docs/cloudrun/cli/services/deploy.mdxnew file mode 100644index 0000000000..230e360dac--- /dev/null+++ b/packages/docs/docs/cloudrun/cli/services/deploy.mdx@@ -0,0 +1,110 @@+---+image: /generated/articles-docs-cloudrun-cli-services.png+sidebar_label: deploy+title: 'npx remotion cloudrun services deploy'+slug: /cloudrun/cli/services/deploy+crumb: 'Cloud Run CLI Reference'+---++<ExperimentalBadge>+ <p>+ Cloud Run is in <a href="/docs/cloudrun-alpha">Alpha</a>, which means APIs may change in any version and documentation is not yet finished. See the <a href="https://remotion.dev/changelog">changelog to stay up to date with breaking changes</a>.+ </p>+</ExperimentalBadge>++```+npx remotion cloudrun services deploy+```++Creates a new service in your GCP project. If a service exists in the same region, with the same Remotion version, with the same amount of memory, disk space and timeout duration, the name of the already deployed service will be returned instead.++<details>+ <summary>Example output</summary>+ <pre>+ Validating Deployment of Cloud Run Service:+ <br />+ <br />+ Remotion Version: 3.3.95+ <br />+ Memory Limit: 2Gi+ <br />+ CPU Limit: 1.0+ <br />+ Timeout: 300+ <br />+ Project Name: remotion-example+ <br />+ Region: us-east1+ <br />+ <br />+ Deploying Cloud Run Service...+ <br />+ <br />+ <br />+ Cloud Run Deployed!+ <br />+ <br />+ Service name: remotion--3-3-95--mem512mi--cpu2--t-1200+ <br />+ Version: 3.3.95+ <br />+ CPU Limit: 2<br />+ Memory Limit: 512Mi+ <br />+ Timeout: 1200sec+ <br />+ Region: us-east1+ <br />+ Service URL: https://remotion--3-3-95--mem512mi--cpu2--t-1200-1a2b3c4d5e-ue.a.run.app+ <br />+ GCP Console URL: https://console.cloud.google.com/run/detail/us-east1/remotion--3-3-95--mem512mi--cpu2--t-1200/logs+ <br />+ <br />+ </pre>+</details>++## `--region`++The [GCP region](/docs/cloudrun/region-selection) to select. The site that the service will be accessing should also be in this same region to minimise latency.++## `--memoryLimit`++The upper bound on the amount of RAM that the Cloud Run service can consume. Default: 2 GB.++## `--cpuLimit`++The maximum number of CPU cores that the Cloud Run service can use to process requests. Default: 1.0.++## `--minInstances`++The minimum number of service instances to have available, regardless of requests. Default: 0.++:::note+Any running instances, even if they are not performing a render, will be billable in GCP. The default minimum number of instances is zero, which means that when no requests are made to your service, you are not billed.+:::++## `--maxInstances`++The maximum number of service instances that can be create by GCP in response to incoming requests. Default: 100.++## `--timeoutSeconds`++Timeout of the Cloud Run service. Default: 300 seconds.++:::info+Not to be confused with the [`--timeout` flag when rendering which defines the timeout for `delayRender()`](/docs/cli/render#--timeout).+:::++## `--onlyAllocateCpuDuringRequestProcessing`<AvailableFrom v="4.0.221" />++If this is set to true, `cpu_idle` will be set to `true` in the service manifest.+CPU alloction will be disabled while no request is being processed, which can lead to significant cost savings.++## `--quiet`, `-q`++Only logs the service name, and 'Authenticated access granted'.++## See also++- [Setup guide](/docs/cloudrun/setup)+- [Cloud Run services](/docs/cloudrun/cli/services)diff --git a/packages/docs/docs/cloudrun/cli/services/ls.mdx b/packages/docs/docs/cloudrun/cli/services/ls.mdxnew file mode 100644index 0000000000..05e30b4ba5--- /dev/null+++ b/packages/docs/docs/cloudrun/cli/services/ls.mdx@@ -0,0 +1,74 @@+---+image: /generated/articles-docs-cloudrun-cli-services.png+sidebar_label: ls+title: 'npx remotion cloudrun services ls'+slug: /cloudrun/cli/services/ls+crumb: 'Cloud Run CLI Reference'+---++<ExperimentalBadge>+ <p>+ Cloud Run is in <a href="/docs/cloudrun-alpha">Alpha</a>, which means APIs may change in any version and documentation is not yet finished. See the <a href="https://remotion.dev/changelog">changelog to stay up to date with breaking changes</a>.+ </p>+</ExperimentalBadge>++```+npx remotion cloudrun services ls+```++Lists the services that you have deployed to GCP in the [selected region](/docs/cloudrun/region-selection).++<details>+ <summary>Example output</summary>+ <pre>+ 2 services in us-east1+ <br />+ <br />+ Service name: remotion--3-3-95--mem512mi--cpu2--t-1200+ <br />+ Version: 3.3.95+ <br />+ CPU Limit: 2<br />+ Memory Limit: 512Mi+ <br />+ Timeout: 1200sec+ <br />+ Region: us-east1+ <br />+ Service URL: https://remotion--3-3-95--mem512mi--cpu2--t-1200-1a2b3c4d5e-ue.a.run.app+ <br />+ GCP Console URL: https://console.cloud.google.com/run/detail/us-east1/remotion--3-3-95--mem512mi--cpu2--t-1200/logs+ <br />+ <br />+ Service name: remotion--3-3-82--mem512mi--cpu1-0--t-800+ <br />+ Version: 3.3.82+ <br />+ CPU Limit: 1.0+ <br />+ Memory Limit: 512Mi+ <br />+ Timeout: 800sec+ <br />+ Region: us-east1+ <br />+ Service URL: https://remotion--3-3-82--mem512mi--cpu1-0--t-800-1a2b3c4d5e-ue.a.run.app+ <br />+ GCP Console URL: https://console.cloud.google.com/run/detail/us-east1/remotion--3-3-82--mem512mi--cpu1-0--t-800/logs+ <br />+ <br />+ </pre>+</details>++## `--region`++The [GCP region](/docs/cloudrun/region-selection) to list services from.++## `--quiet`, `-q`++Prints only the service names in a space-separated list. If no services exist, prints `()`++## See also++- [Setup guide](/docs/cloudrun/setup)+- [Cloud Run services](/docs/cloudrun/cli/services)diff --git a/packages/docs/docs/cloudrun/cli/services/rm.mdx b/packages/docs/docs/cloudrun/cli/services/rm.mdxnew file mode 100644index 0000000000..f5aab7c2bb--- /dev/null+++ b/packages/docs/docs/cloudrun/cli/services/rm.mdx@@ -0,0 +1,53 @@+---+image: /generated/articles-docs-cloudrun-cli-services.png+sidebar_label: rm+title: 'npx remotion cloudrun services rm'+slug: /cloudrun/cli/services/rm+crumb: 'Cloud Run CLI Reference'+---++<ExperimentalBadge>+ <p>+ Cloud Run is in <a href="/docs/cloudrun-alpha">Alpha</a>, which means APIs may change in any version and documentation is not yet finished. See the <a href="https://remotion.dev/changelog">changelog to stay up to date with breaking changes</a>.+ </p>+</ExperimentalBadge>++```+npx remotion cloudrun services rm remotion--3-3-82--mem512mi--cpu1-0--t-800+```++Removes one or more services from your GCP project. Pass a space-separated list of services you'd like to delete.++<details>+<summary>+Example output+</summary>+<pre>+<br/>+Service name: remotion--3-3-82--mem2gi--cpu1-0--t-800<br/>+Version: 3.3.82<br/>+CPU Limit: 1.0<br/>+Memory Limit: 2Gi<br/>+Timeout: 300sec<br/>+Region: us-east1<br/>+Service URL: https://remotion--3-3-82--mem2gi--cpu1-0--t-800-1a2b3c4d5e-ue.a.run.app<br/>+GCP Console URL: https://console.cloud.google.com/run/detail/us-east1/remotion--3-3-82--mem2gi--cpu1-0--t-800/logs+Delete? (Y/n): Y<br/>+Deleted!+<br/>++</pre>+</details>++## `--region`++The [GCP region](/docs/cloudrun/region-selection) to select.++## `--yes`, `-y`++Skips confirmation.++## See also++- [Setup guide](/docs/cloudrun/setup)+- [Cloud Run services](/docs/cloudrun/cli/services)diff --git a/packages/docs/docs/cloudrun/cli/services/rmall.mdx b/packages/docs/docs/cloudrun/cli/services/rmall.mdxnew file mode 100644index 0000000000..ef250f881a--- /dev/null+++ b/packages/docs/docs/cloudrun/cli/services/rmall.mdx@@ -0,0 +1,81 @@+---+image: /generated/articles-docs-cloudrun-cli-services.png+sidebar_label: rmall+title: 'npx remotion cloudrun services rmall'+slug: /cloudrun/cli/services/rmall+crumb: 'Cloud Run CLI Reference'+---++<ExperimentalBadge>+ <p>+ Cloud Run is in <a href="/docs/cloudrun-alpha">Alpha</a>, which means APIs may change in any version and documentation is not yet finished. See the <a href="https://remotion.dev/changelog">changelog to stay up to date with breaking changes</a>.+ </p>+</ExperimentalBadge>++```+npx remotion cloudrun services rmall+```++Removes all services from your GCP project for a certain region.++<details>+ <summary>Example output</summary>+ <pre>+ 2 services in us-east1+ <br />+ <br />+ Service name: remotion--3-3-95--mem512mi--cpu2--t-1200+ <br />+ Version: 3.3.95+ <br />+ CPU Limit: 2<br />+ Memory Limit: 512Mi+ <br />+ Timeout: 1200sec+ <br />+ Region: us-east1+ <br />+ Service URL: https://remotion--3-3-95--mem512mi--cpu2--t-1200-1a2b3c4d5e-ue.a.run.app+ <br />+ GCP Console URL: https://console.cloud.google.com/run/detail/us-east1/remotion--3-3-95--mem512mi--cpu2--t-1200/logs+ <br />+ <br />+ Delete? (Y/n) n<br />+ Skipping service - remotion--3-3-95--mem512mi--cpu2--t-1200.+ <br />+ <br />+ Service name: remotion--3-3-82--mem512mi--cpu1-0--t-800+ <br />+ Version: 3.3.82+ <br />+ CPU Limit: 1.0+ <br />+ Memory Limit: 512Mi+ <br />+ Timeout: 800sec+ <br />+ Region: us-east1+ <br />+ Service URL: https://remotion--3-3-82--mem512mi--cpu1-0--t-800-1a2b3c4d5e-ue.a.run.app+ <br />+ GCP Console URL: https://console.cloud.google.com/run/detail/us-east1/remotion--3-3-82--mem512mi--cpu1-0--t-800/logs+ <br />+ <br />+ Delete? (Y/n) n<br />+ Skipping service - remotion--3-3-82--mem512mi--cpu1-0--t-800.+ <br />+ </pre>+</details>++## `--region`++The [GCP region](/docs/cloudrun/region-selection) to remove services from.++## `--yes`, `-y`++Skips confirmation.++## See also++- [Setup guide](/docs/cloudrun/setup)+- [Cloud Run services](/docs/cloudrun/cli/services)diff --git a/packages/docs/docs/cloudrun/deployservice.mdx b/packages/docs/docs/cloudrun/deployservice.mdxindex 6d034d5e5b..cba647bec8 100644--- a/packages/docs/docs/cloudrun/deployservice.mdx+++ b/packages/docs/docs/cloudrun/deployservice.mdx@@ -88,6 +88,6 @@ An object with the following values:## See also- [Source code for this function](https://github.com/remotion-dev/remotion/blob/main/packages/cloudrun/src/api/deploy-service.ts)-- [CLI equivalent: npx remotion cloudrun services deploy](/docs/cloudrun/cli/services#deploy)+- [CLI equivalent: npx remotion cloudrun services deploy](/docs/cloudrun/cli/services/deploy)- [deleteService()](/docs/cloudrun/deleteservice)- [getServices()](/docs/cloudrun/getservices)diff --git a/packages/docs/docs/cloudrun/speculateservicename.mdx b/packages/docs/docs/cloudrun/speculateservicename.mdxindex 674ef6b01e..8c36e087a5 100644--- a/packages/docs/docs/cloudrun/speculateservicename.mdx+++ b/packages/docs/docs/cloudrun/speculateservicename.mdx@@ -76,4 +76,4 @@ A string with the speculated name of the service.- [Source code for this function](https://github.com/remotion-dev/remotion/blob/main/packages/cloudrun/src/api/speculate-service-name.ts)- [deployService()](/docs/cloudrun/deployservice)-- CLI version of `deployService()`: [`npx remotion cloudrun services deploy`](/docs/cloudrun/cli/services#deploy)+- CLI version of `deployService()`: [`npx remotion cloudrun services deploy`](/docs/cloudrun/cli/services/deploy)diff --git a/packages/docs/sidebars.js b/packages/docs/sidebars.jsindex e9442446d5..a5ca4449cf 100644--- a/packages/docs/sidebars.js+++ b/packages/docs/sidebars.js@@ -42,7 +42,20 @@ module.exports = {},items: ['cloudrun/cli/sites',- 'cloudrun/cli/services',+ {+ type: 'category',+ label: 'services',+ link: {+ type: 'doc',+ id: 'cloudrun/cli/services',+ },+ items: [+ 'cloudrun/cli/services/deploy',+ 'cloudrun/cli/services/ls',+ 'cloudrun/cli/services/rm',+ 'cloudrun/cli/services/rmall',+ ],+ },'cloudrun/cli/render','cloudrun/cli/still','cloudrun/cli/permissions',