Peat itself is way too acidic without buffers. Best to use a potting mix with ph buffers (all major brands are ph-adjusted already) to neutralize the peat, and most have some sort of composted organics in it that will aid in plant growth and development. (worm castings, forest humus, feather meal...)
Perlite is needed to 'lighten-up' the soil and keep it from becoming a muddy mess, and helps with the wet-dry cycle cannabis prefers. Don't overdo the perlite though, or during the summer you'll be watering twice a day.

Composts are generally ph balanced to around 6.0 ph, and are unacceptable for a stand-alone medium in containers unless you add limestone to properly buffer the medium. Best to avoid problems and get the right tool for the job. :thumbsup: