proofmode 0.8.4

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

services:
  proofmode:
    image: guardianproject/proofmode:latest
    build:
      context: .
      dockerfile: Dockerfile
      platforms:
        - linux/amd64
        - linux/arm64
    container_name: proofmode
    restart: unless-stopped
    user: "1000:1000"
    environment:
      # Logging configuration
      - RUST_LOG=${RUST_LOG:-info}
      
      # ProofMode directories
      - PROOFMODE_INPUT_DIR=/app/input
      - PROOFMODE_OUTPUT_DIR=/app/output
      - PROOFMODE_CONFIG_DIR=/app/config
      
      # Optional: External services
      # - NOTARIZATION_SERVICE=${NOTARIZATION_SERVICE:-}
      # - IPFS_GATEWAY=${IPFS_GATEWAY:-https://ipfs.io}
    
    volumes:
      # Input media files
      - ./media:/app/input:ro
      
      # Output proof bundles
      - ./proofs:/app/output
      
      # Configuration and keys
      - ./config:/app/config:ro
      
      # Optional: Host time sync
      - /etc/localtime:/etc/localtime:ro
    
    # Resource limits
    deploy:
      resources:
        limits:
          cpus: '2.0'
          memory: 2G
        reservations:
          cpus: '0.5'
          memory: 512M
    
    # Health check
    healthcheck:
      test: ["CMD", "proofmode", "--version"]
      interval: 30s
      timeout: 3s
      retries: 3
      start_period: 5s
    
    # Network configuration
    networks:
      - proofmode-net
    
    # Security options
    security_opt:
      - no-new-privileges:true
    read_only: true
    tmpfs:
      - /tmp
      - /var/tmp
    
    # Logging
    logging:
      driver: "json-file"
      options:
        max-size: "10m"
        max-file: "3"

  # Optional: IPFS node for distributed storage
  ipfs:
    image: ipfs/kubo:latest
    container_name: proofmode-ipfs
    restart: unless-stopped
    environment:
      - IPFS_PROFILE=server
    volumes:
      - ipfs-data:/data/ipfs
    ports:
      - "4001:4001" # Swarm
      - "5001:5001" # API
      - "8080:8080" # Gateway
    networks:
      - proofmode-net
    profiles:
      - with-ipfs

  # Optional: PostgreSQL for metadata storage
  postgres:
    image: postgres:16-alpine
    container_name: proofmode-db
    restart: unless-stopped
    environment:
      - POSTGRES_DB=proofmode
      - POSTGRES_USER=proofmode
      - POSTGRES_PASSWORD=${DB_PASSWORD:-changeme}
    volumes:
      - postgres-data:/var/lib/postgresql/data
    networks:
      - proofmode-net
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U proofmode"]
      interval: 10s
      timeout: 5s
      retries: 5
    profiles:
      - with-database

networks:
  proofmode-net:
    driver: bridge

volumes:
  ipfs-data:
  postgres-data: