🎥 Make videos programmatically with React
added tarInstaller to build command cloudrun
Matt McGillivray7f42f8c42096
diff --git a/packages/cloudrun/gcpInstaller/gcpInstaller.tar b/packages/cloudrun/gcpInstaller/gcpInstaller.tarnew file mode 100644index 0000000000..2858943194Binary files /dev/null and b/packages/cloudrun/gcpInstaller/gcpInstaller.tar differdiff --git a/packages/cloudrun/gcpInstaller/install.mjs b/packages/cloudrun/gcpInstaller/install.mjsindex 19f77e2705..20ec386001 100644--- a/packages/cloudrun/gcpInstaller/install.mjs+++ b/packages/cloudrun/gcpInstaller/install.mjs@@ -1,12 +1,12 @@-import { execSync } from "child_process";+import {execSync} from 'child_process';// Components-import { colorCode } from "./components/colorCodes.mjs";-import { cloudRunSplashScreen } from "./components/splashScreen.mjs";-import { taskPrompt } from "./components/taskPrompt.mjs";+import {colorCode} from './components/colorCodes.mjs';+import {cloudRunSplashScreen} from './components/splashScreen.mjs';+import {taskPrompt} from './components/taskPrompt.mjs';// Tasks-import { generateEnv } from "./tasks/generateEnv.mjs";-import { updateRemotion } from "./tasks/updateRemotion.mjs";-import { setupGcpProject } from "./tasks/setupGcpProject.mjs";+import {generateEnv} from './tasks/generateEnv.mjs';+import {setupGcpProject} from './tasks/setupGcpProject.mjs';+import {updateRemotion} from './tasks/updateRemotion.mjs';/***************************************** Splash screen for Remotion Cloud Run@@ -17,20 +17,20 @@ cloudRunSplashScreen();* Set project ID for Terraform and gcloud commands****************************************/execSync(`echo "Retrieving current Project ID..."`, {- stdio: "inherit",+ stdio: 'inherit',});-const projectID = execSync("gcloud config get-value project", {- stdio: ["inherit", "pipe", "pipe"],+const projectID = execSync('gcloud config get-value project', {+ stdio: ['inherit', 'pipe', 'pipe'],})- .toString()- .trim();+ .toString()+ .trim();execSync(- `echo "Project set to ${colorCode.blueText}${projectID}${colorCode.resetText}\n"`,- {- stdio: "inherit",- }+ `echo "Project set to ${colorCode.blueText}${projectID}${colorCode.resetText}\n"`,+ {+ stdio: 'inherit',+ });/****************************************@@ -39,18 +39,18 @@ execSync(const selection = await taskPrompt(projectID);switch (selection) {- case "runTerraform":- await setupGcpProject(projectID);- break;+ case 'runTerraform':+ await setupGcpProject(projectID);+ break;- case "updateRemotion":- await updateRemotion(projectID);- break;+ case 'updateRemotion':+ await updateRemotion(projectID);+ break;- case "generateEnv":- await generateEnv(projectID);- break;+ case 'generateEnv':+ await generateEnv(projectID);+ break;- default:- break;+ default:+ break;}diff --git a/packages/cloudrun/gcpInstaller/installer.tar b/packages/cloudrun/gcpInstaller/installer.tardeleted file mode 100644index 8ba71e60af..0000000000Binary files a/packages/cloudrun/gcpInstaller/installer.tar and /dev/null differdiff --git a/packages/cloudrun/package.json b/packages/cloudrun/package.jsonindex 938457c50f..91b01f51ac 100644--- a/packages/cloudrun/package.json+++ b/packages/cloudrun/package.json@@ -4,8 +4,9 @@"description": "GCP Cloud Run alternative to lambda rendering","main": "dist/index.js","scripts": {- "build": "tsc -d && pnpm run buildContainer",+ "build": "tsc -d && pnpm run buildContainer && pnpm run tarInstaller","buildContainer": "ts-node src/admin/bundle-renderLogic.ts",+ "tarInstaller": "mkdir ./temp && tar -cf ./temp/gcpInstaller.tar -C . --exclude='gcpInstaller/gcpInstaller.tar' gcpInstaller && mv ./temp/gcpInstaller.tar ./gcpInstaller && rmdir ./temp","start": "functions-framework --target=TypescriptFunction","watch": "tsc -w","lint": "eslint src --ext ts,tsx"@@ -47,4 +48,4 @@]}}-}+}\ No newline at end of filediff --git a/packages/docs/docs/cloudrun/generateEnvFile.md b/packages/docs/docs/cloudrun/generateEnvFile.mdindex 1cd65e2b60..8c7e77a763 100644--- a/packages/docs/docs/cloudrun/generateEnvFile.md+++ b/packages/docs/docs/cloudrun/generateEnvFile.md@@ -21,7 +21,7 @@ GCP allows a maximum of 10 keys per service account. If you have already created3. Within the Cloud Shell, type the following command, and select option 3. Follow the remaining prompts.```bash- curl --remote-name-all https://raw.githubusercontent.com/UmungoBungo/remotion/gcp-lambda-alternative/packages/cloudrun/{terraform/main.tf,install.mjs} && node install.mjs+ curl --remote-name-all https://raw.githubusercontent.com/UmungoBungo/remotion/gcp-lambda-alternative/packages/cloudrun/installer.zip && node install.mjs```<!-- ToDo - host this in the official Remotion repo -->