Skip to main content

在 VPS 上部署 Remotion Studio

Also available as a 3min video
部署 Remotion Studio

可从 v4.0.46 获取

🌐 available from v4.0.46

你可以将 Remotion Studio 部署到云中的长期运行服务器,并让渲染界面对你的团队可用。 为此,你需要:

🌐 You can deploy the Remotion Studio to a long-running server in the cloud and make the render UI accessible to your team.
To do so, you need to:

  • 安装 Node.js 和 Chrome
  • 在服务器上运行 npx remotion studio
  • 确保端口3000可被互联网访问

以下示例已使用 npx create-video@latest 初始化的 Hello World 模板进行测试。

🌐 The following examples have been tested with the Hello World template initialized using npx create-video@latest.

将 Remotion Studio 容器化

🌐 Dockerizing the Remotion Studio

Dockerfile
FROM node:22-bookworm-slim # Install Chrome dependencies RUN apt-get update RUN apt install -y \ libnss3 \ libdbus-1-3 \ libatk1.0-0 \ libgbm-dev \ libasound2 \ libxrandr2 \ libxkbcommon-dev \ libxfixes3 \ libxcomposite1 \ libxdamage1 \ libatk-bridge2.0-0 \ libpango-1.0-0 \ libcairo2 \ libcups2 # Copy everything from your project to the Docker image. Adjust if needed. COPY package.json package*.json yarn.lock* pnpm-lock.yaml* bun.lockb* bun.lock* tsconfig.json* remotion.config.* ./ COPY src ./src # If you have a public folder: COPY public ./public # Install the right package manager and dependencies - see below for Yarn/PNPM RUN npm i # Install Chrome RUN npx remotion browser ensure CMD ["npx", "remotion", "studio"]

Fly.io

将 Remotion Studio 部署到 Fly.io

🌐 To deploy the Remotion Studio to Fly.io:

  • 首先将上面的 Dockerfile 添加到仓库中。
  • Dockerfile 进行以下更改(适用于 v4.0.125 及以上版本):
- CMD ["npx", "remotion", "studio"]
+ CMD ["npx", "remotion", "studio", "--ipv4"]
  • 确保你使用的是付费计划(免费计划内存太小)
  • 使用以下命令:
fly launch \
  # Get 2 CPU cores and 4GB of memory
  --vm-size=performance-2x \
  # Disable 2x replication
  --ha=false \
  # Use Remotion's port
  --internal-port=3000 \
  # Use Docker, not Node
  --dockerfile Dockerfile

对于以下问题,回答“否”:

🌐 For the following questions, answer no:

? Would you like to set up a Postgresql database now? No
? Would you like to set up an Upstash Redis database now? No
? Create .dockerignore from 1 .gitignore files? No

当被问及是否要部署时,请回答“是”:

🌐 Answer Yes when asking if you want to deploy:

? Do you want to deploy now? Yes

你应该获取一个 Studio 部署的 URL!

🌐 You should get a URL where the Studio was deployed!

Render.com

将 Remotion Studio 部署到 Render.com

🌐 To deploy the Remotion Studio to Render.com:

  • 首先将上面的 Dockerfile 添加到仓库中。
  • 创建一个新的“Web 服务”并链接你的代码仓库。
  • 至少选择“标准”计划(2GB 内存)。
  • 部署!

DigitalOcean 应用平台

🌐 DigitalOcean App Platform

目前无法工作。渲染按钮被禁用,因为 DigitalOcean HTTP 代理不支持服务器发送事件

🌐 Is not working at the moment. The Render Button is disabled, because the DigitalOcean HTTP Proxy does not support server-sent events.

不过,普通的 DigitalOcean droplet 确实可以工作。

🌐 A normal DigitalOcean droplet does work, though.

Scaleway 无服务器容器

🌐 Scaleway Serverless Container

要部署 Scaleway 无服务器容器

🌐 To deploy the Scaleway Serverless Container:

你可以找到一个将 Remotion Studio 部署到 Scaleway 无服务器容器的 GitHub Action 工作流示例

🌐 You can find an example of a github action workflow that deploy Remotion Studio to Scaleway Serverless Container.

部署示例

🌐 Example for deployment

一个用于部署 Remotion Studio 的测试项目可在这里获取。

🌐 A test project to deploy the Remotion Studio is available here.

另请参阅

🌐 See also