Start with reading up on the spine and the different types of vertebrae- the lumbar vertebrae and cervical are where most of the spine/neck bending comes from. Look at a few images of dogs in extreme poses- stretching, sleeping, galloping etc and draw a line over where their spine roughly is. This should give you a pretty good idea of its range of motion.
In terms of the spine in motion, just check out slow motion footage of a dog galloping. It’s a really good example of how the spine bends and stretches (notice the scapula sliding forward when the front legs are outstretched- the whole body tries to become as long as possible).
Here is a little website with a full list of the normal range of motion for each bone in a dog/cat (check out the table at the bottom for the actual values). Not sure how accurate it is but it should help.
I highly reccomend Stuart Sumida’s stuff too. Here’s one of his PDFs on animal locomotion. Scroll down a bit and there’s loads of stuff on dogs.
Rigging Dojo’s quadruped rigging tutorialwill be a great starting point in terms of making an animator friendly rig, but if you’re aiming for realism then you’d have to change it a bit.
You should definitely learn about the muscles. The latissimus dorsi is an interesting one- covers the entire side of the ribcage and attaches to the dog’s front leg. The braciocephalicus is a real pain in the ass- it comes from the back of the dogs head and attaches to the front of its foreleg.