Ive used ram mounts. They make ball and sockets, rail mounts, ball to ball clamps etc. Amazon has them and some cheaper makes as well. On our Cal20 I clamped the ball type to the boat, mounted that to an extendable "selfie stick" (no, I dont use it as a selfie stick ;) ). It is essentially an extendible camera boom. This way you can change the positions of the go pro, hang it way overboard to show heel or above the boat, in front of you, behind you what ever. I have a ram mount on the stanchion by the gate on our 38 Irwin. Same deal. Almost done installing a "Tower In a Box" sail arch. One thing I will do for the go pro is add a pole on that that can pivot and swivel from below. Get some good shots from above and behind the main sail.
Professional 10-In-1 GoPro Monopod, 15”- 47” Waterproof Selfie Stick For Go Pro Hero, Action Cameras, Smartphones, Digital Compacts (Black) https://www.amazon.com/dp/B01MQFU8OI/ref=cm_sw_r_cp_apa_i_hrCwBbFF76594
RAM Zinc Coated U-Bolt Mounting Base with 1 inch Ball https://www.amazon.com/dp/B0012TWRAO/ref=cm_sw_r_cp_apa_i_osCwBb1391424
Ram Mount Composite Short Double Socket Arm for 1-Inch Ball Bases https://www.amazon.com/dp/B005KWPJ04/ref=cm_sw_r_cp_apa_i_2sCwBbBAA72C4
Just a few parts they offer.
Edit: added additional info.