I always assumed a shipyard that built military vehicles didn't do civilian stuff in the same way that a tank factory doesn't build cars.
I do kind of like the idea that civilian ships are tied into growth and expansion with perhaps a minimum amount of civilian vehicles are required for your colonies to reach a certain levels of development and having a surplus will speed of growth. It could be as simple as setting the shipyard to auto build commercial vehicles and then it goes away and does it with no more interaction for you starts producing space trucks, and space buses. As your colonies develop you start to see more advanced and large civilian vehicles you might even see a luxury casino station open in orbit of a planet.
The most widely produced tank in history was initially produced in a locomotive factory that was converted for wartime use. The battleship Bismarck was made in the same yard that produced some of the largest civilian liners in history, and now produces warships and equipment for the oil industry. Industrial capacity is industrial capacity. If you can build a heavily armoured warship, then you can likely build lighter commercial ships in even less time.
One mechanic that could be interesting to play with is having different classes of production that are suitable for either commercial or military production. Engines and hulls for example. The factories that can build the biggest engines would clearly cost more, say 3x as much as one that could only produce smaller engines (such as those more likely to be used by lighter commercial vessels), but while the 'bigger' factory could also produce the smaller engines it would no do so at 3x the rate. The same could go for hull armour. Yards designed mainly to handle lighter armour would be cheaper, but take far longer to build ships with heavier armour.
The economy could be based on a 'merchant marine' and private sector fleets. While most planets would produce at least a little of any given resource, various planets could specialize in production of a handful so they can provide a massive surplus over what they would use internally. You could also include things like ground troops that would need to be ferried between bases and the front line. May even want to include heavy and light transports, where heavy ships would be able to survive combat, while the lighter versions would suffer extremely high losses. The lighter ones could be used to ferry troops and supplies in low combat-risk zones to supply dumps, while the heavier ones would then finish the journey.
How you wage war would then depend on how you choose to tool your economy. Build game play up such that a heavy "Fleet" focused warfare style can be played in a way that is just as valid as a more 'ground force' based approach. Where a fleet based warfare would focus on controlling lines of supply and be a siege warfare style, the ground based attacks would rely on a smaller fleet designed to just protect a fist of transports that pour troops into an area. The fleet could respond to threats faster, but the landing force would be exceptionally potent if you are able to move the troops and supplies to forward staging areas fast enough.
Having a strong civilian fleet could offer you bonuses in research, production expansion, general 'happiness', and such, while strong military control over transit could offer a bonus to espionage defence. (Spies and such are more free to move about your empire when there is less oversight.)