Raech, in the house I make a fruit fly trap by mixing about a tablespoon of apple cider vinegar in 1/2 cup water, and adding a drop of dish soap (breaks the surface tension of the water so the flies drown). It works really well, and I am sure it would work outside or in a greenhouse too. Good luck!
Just made three of them, one for my tomato pot, one for the mint pot, and one for the square garden. Hopefully that helps. Thank you