Just weeks after a physical fight left her in handcuffs, Naya Rivera </a>and her estranged husband Ryan Dorsey </a>have come to a truce over custody of their toddler son and other family matters .<br /><br />According to Los Angeles Superior Court documents filed on December 22, the Glee actress, 30, and her ex will share joint physical custody of 2-year-old Josey — but first, the actor, 34, must secure stable housing.<br /><br />Until January 31, 2018 — when he has agreed to land his own digs —Dorsey can take their son every day from 7:30 am to 1 pm.<br /><br />In addition, he will have Josey from December 28 to 30 with overnights while he stays in a hotel.<br /><br />Dorsey will also have custody of his son from January 5 until January 7 while he remains in an AirBnB with his mother, stepfather and brother.<br /><br />“After Respondent secures his own housing, Petition and Respondent shall share physical custody of the minor child on a 50/50 basis,” the papers state. “The parties shall determine a specific schedule by mutual agreement.”<br /><br />Only the parents and Rivera’s nanny are allowed to oversee pick-ups and drop-offs.<br /><br />Both parents also share legal custody.<br /><br />Rivera and Dorsey agreed not to make “derogatory” or “insulting” remarks about each other in front of their son, and will refrain from “arguing, yelling” and “using profanity.”<br /><br />Dorsey also agreed not to pursue criminal action in connection with Rivera’s arrest in West Virginia over Thanksgiving weekend.<br /><br />The former couple will also keep mum on social media: Neither is allowed to discuss their divorce on social media.<br /><br />In addition, the exes will visit a co-parenting therapist together twice a month for the next year.<br /><br />As previously reported, Rivera filed for divorce on December 5 after a two-month reconciliation with her husband of three years.<br /><br />On November 25, she was arrested for allegedly striking Dorsey</a> in the head while seemingly “intoxicated” during a family trip to his native West Virginia.<br /><br />