services:
  ironpad:
    container_name: ironpad
    restart: unless-stopped

    build:
      context: .
      dockerfile: Dockerfile

    environment:
      IRONPAD_HOST: "0.0.0.0"
      IRONPAD_PORT: "3000"
      IRONPAD_DISABLE_TRAY: "1"
      IRONPAD_DATA_DIR: "/app/data"
      RUST_LOG: "info"
      # Git sync (optional)
      # IRONPAD_GIT_REMOTE_URL: "git@github.com:your-org/your-private-repo.git"
      # IRONPAD_GIT_SSH_USERNAME: "git"
      # IRONPAD_GIT_SSH_PRIVATE_KEY: "/run/secrets/ironpad_ssh/id_ed25519"
      # IRONPAD_GIT_SSH_PUBLIC_KEY: "/run/secrets/ironpad_ssh/id_ed25519.pub"
      # IRONPAD_GIT_SSH_KNOWN_HOSTS: "/run/secrets/ironpad_ssh/known_hosts"
      # IRONPAD_GIT_SSH_PASSPHRASE: ""
      # IRONPAD_GIT_SYNC_INTERVAL_SECS: "300"
      # IRONPAD_GIT_USE_CLI_FALLBACK: "true"

    ports:
      - "3000:3000"

    volumes:
      - ./data:/app/data
      # Mount SSH key material read-only for private remote auth
      # - ./deploy/ssh:/run/secrets/ironpad_ssh:ro
