Obviously you should consult with your vet about this since the dog may have a condition that would contra-indicate the administration of this medication.
Usual doses are 0.5 to 2mg/kg every 8 to 12 hours (a kg = 2.2 lbs).
Please-please-please talk to your vet about long term pain relief options.
And thank you so very much for asking about this before just treating (very good choice!).
Many have forgotten this truth, but you must not forget it.
You remain responsible, forever, for what you have tamed.