MoneyPrinter Documentation

Automate Creation of YouTube Shorts using MoviePy.

14,080 stars Python Python 2 files ยท ~658 tokens #automation#chatgpt#moviepy#python
RAW Doc

Docker & Self-Hosted Deployment Verified OCI

Deploy MoneyPrinter on any server, homelab, or cloud container platform.

1-Click Terminal Command
bash (docker run)
docker run -d --name moneyprinter -p 5432:5432 --restart always postgres:16-alpine
Configured Services & Ports
โš™๏ธ postgres
image: postgres:16-alpine
๐Ÿ”Œ Ports: 5432:5432
โš™๏ธ frontend
image: build locally
๐Ÿ”Œ Ports: 8001:8001
โš™๏ธ backend
image: build locally
๐Ÿ”Œ Ports: 8080:8080
โš™๏ธ worker
image: build locally
docker-compose.yml
yaml (docker-compose.yml)
version: "3"
services:
  postgres:
    image: postgres:16-alpine
    container_name: "postgres"
    ports:
      - "5432:5432"
    environment:
      - POSTGRES_DB=${POSTGRES_DB:-moneyprinter}
      - POSTGRES_USER=${POSTGRES_USER:-moneyprinter}
      - POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-moneyprinter}
    volumes:
      - postgres_data:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-moneyprinter} -d ${POSTGRES_DB:-moneyprinter}"]
      interval: 5s
      timeout: 5s
      retries: 10
    restart: always

  frontend:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: "frontend"
    ports:
      - "8001:8001"
    command: ["python3", "-m", "http.server", "8001", "--directory", "frontend"]
    volumes:
      - ./Frontend:/app/frontend
    restart: always
  backend:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: "backend"
    ports:
      - "8080:8080"
    command: ["python3", "backend/main.py"]
    volumes:
      - ./files:/temp
      - ./Backend:/app/backend
      - ./fonts:/app/fonts
    environment:
      - ASSEMBLY_AI_API_KEY=${ASSEMBLY_AI_API_KEY}
      - TIKTOK_SESSION_ID=${TIKTOK_SESSION_ID}
      - IMAGEMAGICK_BINARY=/usr/local/bin/magick
      - PEXELS_API_KEY=${PEXELS_API_KEY}
      - OLLAMA_BASE_URL=${OLLAMA_BASE_URL:-http://host.docker.internal:11434}
      - OLLAMA_MODEL=${OLLAMA_MODEL:-llama3.1:8b}
      - DATABASE_URL=${DATABASE_URL:-postgresql+psycopg://moneyprinter:moneyprinter@postgres:5432/moneyprinter}
    extra_hosts:
      - "host.docker.internal:host-gateway"
    depends_on:
      - frontend
      - postgres
    restart: always

  worker:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: "worker"
    command: ["python3", "backend/worker.py"]
    volumes:
      - ./files:/temp
      - ./Backend:/app/backend
      - ./fonts:/app/fonts
    environment:
      - ASSEMBLY_AI_API_KEY=${ASSEMBLY_AI_API_KEY}
      - TIKTOK_SESSION_ID=${TIKTOK_SESSION_ID}
      - IMAGEMAGICK_BINARY=/usr/local/bin/magick
      - PEXELS_API_KEY=${PEXELS_API_KEY}
      - OLLAMA_BASE_URL=${OLLAMA_BASE_URL:-http://host.docker.internal:11434}
      - OLLAMA_MODEL=${OLLAMA_MODEL:-llama3.1:8b}
      - DATABASE_URL=${DATABASE_URL:-postgresql+psycopg://moneyprinter:moneyprinter@postgres:5432/moneyprinter}
    extra_hosts:
      - "host.docker.internal:host-gateway"
    depends_on:
      - postgres
      - backend
      - frontend
    restart: always

volumes:
  files:
  postgres_data: