Yeah,that
should be great I think,especially as long as the barrels are filled with something,water,soil,etc.
If you use peat moss,be sure to add lime,or the PH will be terrible for anything other than strawberries and blueberries and such.
I seeded some greens into the barrels I had prepped for blueberries and they barely grew, while the seed that fell on the ground next to the barrels grew like bonkers.
You could cover the hot frame with a hoop house,patio doors, or maybe both.
I would divert any roof water to outside the frame as to avoid cooling things down.