They wont come out with your fleets nearby.
You should not get too far behind the AI on logistics, but docked fleets have the advantage regardless, until full logistics technology is researched.
How are you on your fleet setup? The best arrangement is a couple of escorts with high defenses and a couple of capital ships with high attack. Also it is better if all your ships are equal hull size otherwise the smaller ships start the battle in a stupidly advanced position and get picked off before your larger ships can catch up