Relativistic collisionless shocks in electron-ion plasmas are thought to occur in the afterglow phase of gamma-ray bursts (GRBs) and in other environments where relativistic flows interact with the interstellar medium. A particular regime of shocks in an unmagnetized plasma has generated much interest for GRB applications. In this Letter, we present ab initio particle-in-cell simulations of unmagnetized relativistic electron-ion shocks. Using long-term 2.5-dimensional simulations with ion-electron mass ratios from 16 to 1000, we resolve the shock formation and reach a steady state shock structure beyond the initial transient. We find that even at high ion-electron mass ratios initially unmagnetized shocks can be effectively mediated by the ion Weibel instability with a typical shock thickness of ~20 ion skin depths. Upstream of the shock, the interaction with merging ion current filaments heats the electron component, so that the postshock flow achieves near-equipartition between the ions and electrons, with the electron temperature reaching 50% of the ion temperature. This energy exchange helps to explain the large electron energy fraction inferred from GRB afterglow observations.