🎥 Make videos programmatically with React
docs for upgrading cloudrun
Matt McGillivrayc5803d6f11e6
diff --git a/packages/cloudrun/container/cloudbuild.json b/packages/cloudrun/container/cloudbuild.jsonindex 32a65e5d05..693de7dd6f 100644--- a/packages/cloudrun/container/cloudbuild.json+++ b/packages/cloudrun/container/cloudbuild.json@@ -20,5 +20,7 @@]}],- "images": ["us-docker.pkg.dev/remotion-dev/cloud-run/render:3.3.96"]-}+ "images": [+ "us-docker.pkg.dev/remotion-dev/cloud-run/render:3.3.96"+ ]+}\ No newline at end of filediff --git a/packages/docs/components/PrereleaseVersion.tsx b/packages/docs/components/PrereleaseVersion.tsxindex 9ad6685686..c5a85ac9a1 100644--- a/packages/docs/components/PrereleaseVersion.tsx+++ b/packages/docs/components/PrereleaseVersion.tsx@@ -1,16 +1,17 @@import React from "react";-const FALLBACK_VERSION = "3.0.1";+const FALLBACK_VERSION = "4.0.1";export const Prerelease: React.FC<{onlySnippet: boolean;-}> = ({ onlySnippet }) => {+ packageName: string;+}> = ({ onlySnippet, packageName = "@remotion/lambda" }) => {const version =typeof URLSearchParams === "undefined"? FALLBACK_VERSION: typeof window === "undefined"- ? FALLBACK_VERSION- : new URLSearchParams(window.location.search).get("version") ??+ ? FALLBACK_VERSION+ : new URLSearchParams(window.location.search).get("version") ??FALLBACK_VERSION;return (<div>@@ -32,13 +33,13 @@ export const Prerelease: React.FC<{{["@remotion/bundler","@remotion/renderer",- "@remotion/lambda",+ packageName,"remotion",].map((r) => {return (<div key={r}><span style={{ color: "#e13238" }}>- - "{r}": "{"3.0.0"}"+ - "{r}": "{"4.0.0"}"</span>{"\n"}<span style={{ color: "#009400" }}>diff --git a/packages/docs/docs/cloudrun/upgrading.md b/packages/docs/docs/cloudrun/upgrading.mdindex 1333ed77b7..e4e0c3ee90 100644--- a/packages/docs/docs/cloudrun/upgrading.md+++ b/packages/docs/docs/cloudrun/upgrading.md@@ -1 +1,53 @@-TODO+---+image: /generated/articles-docs-cloudrun-upgrading.png+id: upgrading+title: Upgrading Cloud Run+slug: /cloudrun/upgrading+---++import {Prerelease} from "../../components/PrereleaseVersion"++- Determine the newest version from the [Releases page](https://github.com/remotion-dev/remotion/releases).+- Upgrade all packages to the newest version (`@remotion/cloudrun`, but also `remotion`, `@remotion/cli` etc.)++<Prerelease onlySnippet packageName="@remotion/cloudrun"/>++- (Optional): Remove the old versions of the service:++:::info+You only should do this if the service is not being used anymore. If you are still using it in production, you can just skip this step.+:::++```+npx remotion cloudrun services rmall -y+```++- Deploy the newest version of the Remotion Cloud Run service:++```+npx remotion cloudrun services deploy+```++- Update the site:++```+npx remotion cloudrun sites create src/index.ts --site-name=my-name+```++:::info++Pass `--site-name` with the name of an existing site to update it. The URL will stay the same but older services may not be able to render the updated site.++If you don't pass `--site-name` a new site URL will be generated. You'll need to update the [`serveUrl`](/docs/cloudrun/rendermediaoncloudrun#serveurl) parameter in your [`renderMediaOnCloudrun()`](/docs/cloudrun/rendermediaoncloudrun) calls. Old deployed services can still render by specifying the old serve URL.+:::++## Separating production and testing environments++If you already shipped Remotion Cloud Run to production, you can upgrade without incurring any downtime:++- Each deployed service has a version (see them using `npx remotion cloudrun services ls`).+ Use the same version of the `@remotion/cloudrun` package to invoke the function.++- You can have multiple services with different versions deployed. Use the [`compatibleOnly`](/docs/cloudrun/getservices#compatibleonly) parameter to find services that match the version of the `@remotion/cloudrun` package.++- Sites/`serveUrl`'s also are version-dependant. Create them with the same version of Remotion that you render them with. Remotion will tolerate mismatches if there are no incompatibilities, but will issue a warning that you might not have all the newest features and bugfixes in the bundled site.diff --git a/packages/docs/docs/lambda/upgrading.md b/packages/docs/docs/lambda/upgrading.mdindex f29f353db4..f88057ae67 100644--- a/packages/docs/docs/lambda/upgrading.md+++ b/packages/docs/docs/lambda/upgrading.md@@ -10,7 +10,7 @@ import {Prerelease} from "../../components/PrereleaseVersion"- Determine the newest version from the [Releases page](https://github.com/remotion-dev/remotion/releases).- Upgrade all packages to the newest version (`@remotion/lambda`, but also `remotion`, `@remotion/cli` etc.)-<Prerelease onlySnippet/>+<Prerelease onlySnippet packageName="@remotion/lambda"/>- (Optional): Remove the old versions of the function: