The heat generated by the initial stages of decomposition can reach over 130 degrees. Many pathogenic organisms are killed at this level of heat, so there will be less of a chance that you are importing something nasty to your garden. However, this heat can also cause damage to roots underneath the pile and ultimately kill a plant. In general, a composting pile should not be placed within 15 feet of any plant. Finished compost, having passed the final stage of aerobic decomposition, can be a good planting medium.
Water is obviously a very important factor to plant growth.
Whether a plant is in a container or planted in the ground, a water balance needs to be achieved. Once you have found this, many fungal problems can be avoided. Too much water can cause some plants to rot and too little water can stress a plant enough to cause premature leaf drop and, eventually, death. Adequate drainage for the plants roots will reduce the chances of fungal problems. When you buy a plant at a nursery, there probably is some peatmoss in the soil mix and orchids are often potted in pine bark or tree fern.