I've got a compost pile that has a nasty population of fruit flies. Probably started because I left veggie waste in the open for too long before adding it to the bin and dressing it.
Is there easy way to keep them from reproducing? Maybe a garden-safe additive I can put on the pile? The bin is outdoors and well away from my house, so they're not a real problem, but they make turning the pile a serious annoyance.
Most compost piles are trash heaps. There are many forms of compost, but below are the two most common.
Vermicompost - this is food scraps eaten by worms. Often done indoors in a bin. This requires a balance and a lot of practice/patience.
Hot composting - a big freaking pile of herbaceous material that breaks down quickly. It normally requires 27 cubic feet and a good balance of carbon-heavy products and nitrogen-heavy products. Or browns and greens.
Most people throw all their food scraps in a pile, it rots or gets eaten by bugs and call it compost. They're not totally wrong, it's just ineffective.