Ken,
First and foremost, life safety first, second, and third!!! All property can be replaced, loved ones cannot.
As far as "fighting the fire", unless you catch it very early in it's development (especially on a boat), evacuate as quickly as possible. Not only do fires tend to progress with amazing speed on a boat, but the products of combustion (smoke, particulates, gases, etc.) are extremely toxic and could incapacitate someone very quickly who inhales them.
Now of course, there are always exceptions to that rule, under certain circumstances, etc. that I don't plan to cover here.
First, keep a clean, well maintained boat, and as mentioned previously, ensure that all electrical work is done by someone competent in the area of
marine electrical.
Install more than the bare minimum number and size of fire extinguishers. Check them regularly for pressure, the safety zap strap in place, and nothing clogging the nozzle. Have them professionally serviced as required. Place an extinguisher in the galley, near the engine room (even if equipped with an automatic system), in each sleeping area, and at the entrances/exits to/from outside. If you have the opportunity, take some training on the operation of portable fire extinguishers.
Install (and regularly test) smoke and CO alarms to provide total coverage, preferably "linked" so if one goes off they all do.
Develop a "safety briefing" (preferably written - for consistency) to ensure that all guests are properly prepared. Cover things like location of exits, extinguishers, use of same, smoke and CO alarms, muster station, etc.
Develop an emergency plan for your vessel, especially for fire situations (because fires are very scary and dangerous on a boat). Practise the (fire) plan at least annually with the regular crew, and do a walk through with guests.
At all docking situations, make it a habit to establish a meeting point where everyone on board would assemble should an evacuation be necessary. Trust me, these are not things you want to try for the first time when the chips are down!!
I know of several families that were saved from house fires because the children had attended fire safety training at school including actually practising it in the "fire safety house"! Remaining relatively calm and doing the correct actions because of your preplanning and preparation can make all the difference in an emergency!
When at transient docks, take the time to check them out from a "what if" point of view, and plan out your courses of action and means of exiting. I agree, avoid docks that are undercover for the reasons already discussed. For example, anytime I am in a hotel, I check out the fire safety systems, the location of both the nearest and a backup exit, and give thought to how I would find that exit in a dark, smoke filled hallway.
I too, strongly advise not using real candles on a boat. I use the little LED "tea light" style candles. They are safe, and don't look too bad
Also be aware that smoking (especially in bed) has caused many fire deaths and injuries over the years. On my boat, no smoking is allowed. However, if you do, then ensure the safe handling of the products afterwards. Put the ashes and butts into an air tight, metal container for later disposal.
I could go on (and probably bore you), and many of the other posts mention good points. Combine the info provided and you will be well on your way to being as fire safe as possible.