Door with physics constraint glitch

How did you resolve it, do you have like a tutorial on how you did the door physics?