OpenReels
Deployment

CI/CD Integration

Integrate OpenReels into CI/CD pipelines with Docker builds and automated video generation.

OpenReels includes a GitHub Actions workflow for building and publishing Docker images, and can be integrated into automated pipelines for batch video generation.

GitHub Actions — Docker Build

The project includes .github/workflows/docker.yml which builds multi-platform Docker images and pushes them to GitHub Container Registry (GHCR).

Triggers

  • Push to main — builds and pushes with latest tag
  • Release published — tags with semantic version (v1.0.0, v1.0)

Workflow

name: Docker

on:
  push:
    branches: [main]
  release:
    types: [published]

env:
  REGISTRY: ghcr.io
  IMAGE_NAME: ${{ github.repository }}

jobs:
  build-and-push:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      packages: write

    steps:
      - uses: actions/checkout@v4

      - uses: docker/login-action@v3
        with:
          registry: ghcr.io
          username: ${{ github.actor }}
          password: ${{ secrets.GITHUB_TOKEN }}

      - uses: docker/setup-buildx-action@v3

      - id: meta
        uses: docker/metadata-action@v5
        with:
          images: ghcr.io/${{ github.repository }}
          tags: |
            type=raw,value=latest,enable={{is_default_branch}}
            type=ref,event=branch
            type=semver,pattern={{version}}
            type=semver,pattern={{major}}.{{minor}}
            type=sha

      - uses: docker/build-push-action@v6
        with:
          context: .
          platforms: linux/amd64,linux/arm64
          push: true
          tags: ${{ steps.meta.outputs.tags }}
          labels: ${{ steps.meta.outputs.labels }}
          cache-from: type=gha
          cache-to: type=gha,mode=max

Image Tags

TriggerTags
Push to mainlatest, main, sha-abc1234
Release v1.2.31.2.3, 1.2, sha-abc1234

Platforms

Images are built for both linux/amd64 and linux/arm64, with GitHub Actions cache (type=gha) for faster rebuilds.


Automated Video Generation

You can use OpenReels in CI to generate videos as part of an automated pipeline.

The --yes Flag

The CLI normally prompts for confirmation before rendering (cost estimate approval). In CI, use --yes to skip all interactive prompts:

docker run --env-file .env --shm-size=2gb -v ./output:/output \
  openreels --yes "Your topic here"

The Dockerfile default entrypoint already includes --yes:

ENTRYPOINT ["npx", "tsx", "src/index.ts", "--yes", "-o", "/output"]

Example: Generate Videos in GitHub Actions

name: Generate Video

on:
  workflow_dispatch:
    inputs:
      topic:
        description: 'Video topic'
        required: true

jobs:
  generate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Build OpenReels
        run: docker build -t openreels .

      - name: Generate video
        run: |
          docker run \
            -e ANTHROPIC_API_KEY=${{ secrets.ANTHROPIC_API_KEY }} \
            -e ELEVENLABS_API_KEY=${{ secrets.ELEVENLABS_API_KEY }} \
            -e GOOGLE_API_KEY=${{ secrets.GOOGLE_API_KEY }} \
            -e PEXELS_API_KEY=${{ secrets.PEXELS_API_KEY }} \
            --shm-size=2gb \
            -v ${{ github.workspace }}/output:/output \
            openreels "${{ github.event.inputs.topic }}"

      - name: Upload artifact
        uses: actions/upload-artifact@v4
        with:
          name: video
          path: output/

Example: Batch Generation Script

#!/bin/bash
topics=(
  "The history of coffee"
  "How black holes work"
  "The invention of the internet"
)

for topic in "${topics[@]}"; do
  echo "Generating: $topic"
  docker run --env-file .env --shm-size=2gb \
    -v ./output:/output \
    openreels "$topic"
done

Running Tests in CI

- uses: actions/setup-node@v4
  with:
    node-version: 22

- run: corepack enable pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm test

The test suite runs entirely in-process with mocked providers and requires no external services (no Redis, no API keys).


Using the Published Image

Once the Docker workflow pushes an image, you can pull it from GHCR:

docker pull ghcr.io/tsensei/openreels:latest

Use it as a base for Compose deployments or as a standalone CLI:

docker run --env-file .env --shm-size=2gb \
  -v ./output:/output \
  ghcr.io/tsensei/openreels:latest "Your topic"

Environment Variables in CI

Store API keys as repository secrets. Never commit them to the repository.

env:
  ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
  ELEVENLABS_API_KEY: ${{ secrets.ELEVENLABS_API_KEY }}
  GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
  PEXELS_API_KEY: ${{ secrets.PEXELS_API_KEY }}

For Docker Compose in CI, write secrets to a .env file:

- name: Create env file
  run: |
    echo "ANTHROPIC_API_KEY=${{ secrets.ANTHROPIC_API_KEY }}" >> .env
    echo "ELEVENLABS_API_KEY=${{ secrets.ELEVENLABS_API_KEY }}" >> .env
    echo "GOOGLE_API_KEY=${{ secrets.GOOGLE_API_KEY }}" >> .env

Resource Requirements

ResourceMinimumRecommended
CPU2 cores4+ cores
RAM4 GB8 GB
Disk2 GB (image) + 500 MB per video10 GB+
Shared memory2 GB (--shm-size=2gb)2 GB

The --shm-size=2gb flag is required for Remotion's headless Chrome renderer. GitHub Actions runners provide sufficient resources by default, but self-hosted runners may need configuration.