Growing vegetables in pots on a patio or balcony is both fun and practical. The basis for success is the soil mix you use in your containers. In general, vegetables have similar soil needs, so you should be able to mix large quantities and use it in all your pots, either by amending bagged soil or by creating your own mixture.
The most important element of potting soil is the empty space. When you water the plants, water fills the pores in the soil and then drains out, allowing the oxygen that roots need to penetrate into the mix. The spaces in moist soil typically contain about half water and half air.
Potted plants need soil that drains more quickly than open ground, so your mix needs lots of fibrous materials such as coir (coconut fiber) and peat moss, as well as inert substances like sand, perlite and vermiculite. For roots vegetables like carrots and parsnips, you'll need a soil that allows roots to expand easily but that also drains well. Use sand and other fine-textured materials in that container.
Pots dry out more quickly than garden soil, and you don't want to have to water twice a day in summer, so using materials that hold moisture and release it slowly is important. Coir is an excellent choice, but most organic materials are suitable. For vegetables that need large quantities of water, such as melons and squash, use some of the water-holding granules available at nurseries. These absorb water and expand to many times their size, storing it until needed.
You can use a nutrient-poor soil mix, one with sand and peat moss, for instance, then fertilize frequently throughout the growing season. Or you can add slow-release materials such as bone meal to the mix, plus bagged steer manure to create a rich soil that can be supplemented with occasional doses of liquid fertilizer. In general, vegetables are heavy feeders and appreciate generous quantities of nutrients. Do remember that leafy vegetables such as lettuce and spinach need extra nitrogen, while tomatoes, squash and peas need more phosphorous and potassium for flowers and fruit.
Potatoes are usually grown in an acid soil with a pH of 6.0 or below, but most vegetables like a slightly acid to neutral soil with a pH of 6.5 to 7.0. Peat moss is an acid material and needs ground limestone to balance it. Inexpensive pH test kits are available at nurseries and allow you to check your mixture before you plant.
Fine-Tuning the Soil
One of the advantages of growing vegetables in containers is that you can suit the soil to the plant. Bone meal is an excellent addition for any soil, but a little extra for root vegetables is helpful. Using bagged steer manure as a mulch on top also adds nitrogen for leafy greens. If you're using unglazed clay pots, use extra moisture-holding material to counteract the rapid water loss of clay.