proofmode 0.9.0

Capture, share, and preserve verifiable photos and videos
Documentation
version: '3.8'

services:
  proofmode:
    image: proofmode-rust:local
    container_name: proofmode-example
    user: "${USER_ID:-1000}:${GROUP_ID:-1000}"
    volumes:
      # Mount input directory containing media files
      - ./input:/app/input:ro
      # Mount output directory for proof files
      - ./output:/app/output
      # Mount a custom config file (optional)
      - ./config.toml:/config.toml:ro
    environment:
      # Set log level
      - RUST_LOG=info
      # PGP passphrase for signing (optional)
      - PGP_PASSPHRASE=${PGP_PASSPHRASE:-defaultpassword}
    # Example commands - uncomment one to use
    # Generate proof for a single image
    command: generate -f /app/input/test.jpg -s /app/output
    # Check proof for a media file
    # command: check -f /app/input/test.jpg.proof.json
    # Generate proofs for directory
    # command: generate -d /app/input -s /app/output

  # Example service that uses ProofMode as a sidecar
  media-processor:
    image: alpine:latest
    container_name: media-processor
    volumes:
      - ./input:/media:ro
      - ./output:/proofs
    depends_on:
      - proofmode
    command: >
      sh -c "
        echo 'Processing media files...';
        # Your media processing logic here
        # Then call proofmode to generate proofs
        for file in /media/*.jpg; do
          echo \"Processing $$file\";
          # Process the file...
        done
      "

  # Example: Run ProofMode in watch mode for a directory
  proofmode-watch:
    image: proofmode-rust:local
    container_name: proofmode-watch
    environment:
      - RUST_LOG=info
    command: >
      sh -c "while true; do
        echo 'Checking for new files...';
        for file in /input/*.jpg /input/*.mp4; do
          if [ -f \"\$\$file\" ] && [ ! -f \"/output/\$\$(basename \"\$\$file\").proof.json\" ]; then
            echo \"Processing \$\$file\";
            proofmode generate -f \"\$\$file\";
          fi;
        done;
        sleep 10;
      done"
    volumes:
      - ./input:/input:ro
      - ./output:/output
    restart: unless-stopped

volumes:
  proofmode-data: