All ingredients should be at room temperature. Microwave the milk for about 30 seconds. Rinse the sauerkraut with cold water to remove the acid. Sift the flour through a sieve - this way the yeast dough will rise better, and the baked goods will turn out more tasty and airy. Remove the skins from the onion and roughly chop. Line a baking pan with parchment and grease with butter. Preheat the oven to 200 degrees.
Prepare the pie dough. Dissolve dry yeast in warm water or milk. The liquid should be warm, not hot, otherwise the yeast will brew and the dough will not rise. Beat the egg into the sifted flour, add salt, and pour in the warm yeast mixture. Stir and leave the dough under a towel in a warm place for 40 minutes.
Start preparing the filling. Heat a frying pan over medium heat and add a small amount of vegetable oil. Add the onions and fry them for about 1-2 minutes. Add washed sauerkraut to the frying pan with the onions, stir, salt and pepper. Stirring, cook the filling for about 3-4 minutes. Then let it cool completely.
Form the cake and prepare it for baking. The finished dough should rise almost 2 times. Carefully divide it into 2 parts. Roll each part into a layer approximately 1 cm thick. Then place half of the dough in a baking dish and level it, forming sides. Place the filling on the dough and spread evenly with a spoon. Top the pie with the other half of the dough. Carefully pinch the bottom and top layers together to keep the cake closed. Whisk the yolk with salt and brush the top of the pie with it. Place the pie in the oven and bake for 45 minutes at 200 degrees.
Cut the cabbage pie into portions and serve with sour cream or fresh herbs.