There is a 2 part answer to this question, and it depends on where you are with your plants: Cuttings or rooted plants.
FOR CUTTINGS: You're going to want to use the most basic of soils for establishing cuttings, Raw sand or gravel, perlite, fine wood chip mulch, even bagged 'topsoil' works for cuttings. The idea is you want to have a physically stable medium for them to set up in, with access to light moisture but plenty of air, moderate warmth and ZERO fertilizer. Root stimulator is fine, but DO NOT EVER put new cuttings in fertilized potting soil or add any sort of outside nutrients until the plants are transplanted to their actual growing location, with a healthy set of established roots. Most engineered fertilizers are designed to promote healthy adult plant growth, and can be too much for newly sprouting roots. Would be like giving a newborn two adult multivitamin pills a day; more harm than good. Also, since were on the subject, find a partially shady spot to keep your cuttings while they set up. Sun and warmth are fine, and encouraged, but if you over-sun them, they can get bleached and yellow up. Remember, these aren't complete plants, and they have very little way of sustaining or replacing the chlorophyll they use for growth and energy production. At this stage, warmth is more important than sunlight, and if you want, you can even keep them indoors if you have a low power heating mat you can place the pots on.
As a side note, to generate rooted plants at my house all I do is throw my cuttings, usually an entire plant branch, into a large yard tub, in a semi-shady area, and add about 3 inches of water every two weeks or so. It seems to work fine, but people keep telling me you can't start these plants in standing water, so you did not hear that from me.

FOR ESTABLISHED PLANTS: First and foremost, make sure you're using an appropriate sized container. Personally, I recommend working in stages, putting young plants in, say, a gallon sized pot with a support stick, until they grow tall enough to start training on a permanent support, but if you want to jump right away into a endgame sized container, that's fine too. I just prefer the smaller pots because they are mobile, take up less space in the mean time, and it gives you the ability to monitor the plants growth before committing it to the big leagues. I always try to tell people to get multiple cuttings of whatever they decide to grow, that way if theres a problem with a particular cutting, you have backups. You can always give away or discard extras if things work out. And a small container, when youre ready, you can just slit the side of the cheapo nursery pots to free then entire soil ball, or shatter cheap ceramic pots to free them. Avoid pulling plants out of pots to transplant them, as the root tips tend to be very fine and you don't want to do ANY damage, if you can avoid it.
OK, back on topic. Soil composition for growing plants should be porus but hold water. Airy but solid. One of the biggest myths and misconceptions about dragon fruit is the idea of "overwatering" the plants. If your soil is proper, you CANNOT overwater dragon fruit. The problem is STANDING WATER. During the growing and fruiting seasons of the plants, your soil should ALWAYS be moist, but not wet. In the off months, late fall, winter and very early spring, its ok to not water the plants, especially if you live in an area that experiences reliable rainfall. But the rest of the year, the plants need water to survive and grow, and how often you water will depend entirely on your climate and the way you prepared the soil.
There are 3 key needs for dragon fruit when it comes to soil. Water retention, drainage and the ability for the roots to grow freely.
Now retention and drainage seem like they would be at odds with each other, so let me explain what I mean by that. When you water a pot, organic and pourus materials in the soil soak up free standing water and (usually) expand, same as how a dry sponge does. When a volume of soil has absorbed as much water as it can, if the soil compositionand pot design allows, the remaining water drains out of the container. from that point forward, as time, heat and pressure persist, the water in the absorbant parts of the soil slowly leaches back out. This is where the roots collect their needed H2O between watering sessions. Eventually, the stored water is completely exhausted, and it's time to either water again, or the plants will stop collecting new water to use in growth and energy production. The problems arise when too much water is allowed to stay in the spaces between the soil, as the roots also require exposure to the "air" to collect CO2, Nitrogen, etc., just like the rest of the plant does. Making sure your soil can both hold moisture and drain water is key. If you can do this, the third portion, having soil loose enough for the roots to freely expand and spread out, should come naturally.
Wow, that was a long way to go for a recipe for dirt, I know. But since that was the original question, I suppose I should get to that at some point. Here's what I, personally, recommend:
Mix the following (for established plants):
40% quality potting soil, moisture retaining type if available
20% fine grain bark chips (nothing added, no colors, weed block, etc)
20% steer manure
10% playground sand
10% perlite
Prepare your container with 2 inches of course gravel at the bottom for drainange, with either coco fiber or weed block fabric over that (to ensure drainage holes dont get clogged). Add soil mix to fill container to 80% capacity (max). Use a minimum of 15 gallon container for a single plant to grow to full maturity. Larger containers can host 2-3 plants if you have room for them, and are a great way to ensure variety and help with pollinization later on, by mixing varieties in a single container. The 80% fill limit gives you room to both dump in water/liquid fertilizers without having to nurse in your pour, and to allow for addition of additional layers of soil; I ofter use time releaste fertilizers and blooming additives, but since the roots on dragon fruit are VERY shallow, instead of "scratching" in solid fertilizer, i layer it on top and then add an inch of top soil to allow the granulated nutrients to break down under a level of soil, as they are designed to do.
Now, this is how I prepare and prepared my dragon fruit for the world. It's entirely my opinion on how to make it work. Im sure others have differing opinions and techniques, and I encourage everyone interested to seek out multiple ideas before deciding on how they ultimately want to set up their gardens. Climate, location and growing skill can all effect how well you do with your plants, but I do hope this helps you get a bit closer to what you were hoping for.