Heat a large skillet with butter over low heat. Add the onion slices and fry them for about 20 minutes, until they are golden and caramelized.
Preheat the oven to 350°F. Cover a baking pan with baking paper
On a clean kitchen surface, roll out the pastry dough. Cut into 8 (3-inch) circles.
Using a fork, score the dough about 1 cm from the edges in order to prevent the ends of rising in the oven. Brush the circles with a little bit of milk and bake in the oven for about 10 minutes until golden
Into each circle, place caramelized onion pieces, goat cheese and thyme leaves.
Fill each of the circles. Bake for another 20 minutes until golden. Season with salt and pepper. Serve warm.