You could use one level, sitting on the bottom half of a scope ring.
When the rifle is level, fasten your other bubble level somewhere else on the rifle.
Make sure you fasten the second one so that it reads level at the same time as the one on your scope ring.
MidwayUSA used to sell a leveling kit under their Wheeler brand. IIRC, it had at least two bubble levels, one of which was in a fixture that could be clamped onto the barrel.
Level rifle using flat surface (bottom half of scope ring), clamp second level on barrel, adjust so they both indicate level, simultaneously.
Secure rifle in place (rifle vise, cleaning cradle, etc.). Remove the first level, then use the barrel mounted one to verify the rifle remains level.
Then use a plumb bob hanging on the other side of the room to rotate your scope until vertical crosshair matches plumb bob line.
Rifle level, crosshairs level, eye relief correct… carefully snug it all down, maintaining square/level orientation the whole time.
Time to hit the range!
There are lots of ways to accomplish this, and I've used several ways, at different times. Keep looking in books and online, you'll find numerous methods.
As Dan (rugerguy) says, "Neatness counts!"
FWIW, I've never seen a bubble placed in the ejection port like the OP's picture, either(?).