Well, considering a forthcoming beta patch is likely going to change this, instead of answering about turrets, I'll answer about caps.
Per-planet caps are like the one on the Mini-fort. You can build two of those on a planet, then (as long as you have supply and energy, and the metal to build them) you can build a second pair of them elsewhere in the galaxy. You can repeat doing this as many times as you have planets to do it on and energy to spare. (neutral planets close enough to you to have player supply also count as valid locations.)
Galaxy caps are like the ship caps: You have X amount. Once you've built all of those, you can't build more. (If you lose half of them later, you can either wait for the remains rebuilders to rebuild them, or build that half-cap elsewhere.) Everything that is not specifically a per-planet cap is this kind.