Peeling paint on metal exterior doors occurs if the surface wasn't properly prepared prior to painting.
Scrape off all loose paint. Then sand with 200 grit sandpaper. Sand the whole area, even if not peeling. The idea is to remove all loose paint. If the remaining paint doesn't sand, chip or peel off, you know it is well adhered to the surface., and you can leave it on.
This is a very important step for success. Clean the surface with TSP or TSP equivalent spray. This will clean the surface and and allow for proper adhesion of the primer you will apply next.
After the cleaning step is finished, dry the surface with a dry clean cloth. You are now ready to prime.
Use a high quality outdoor primer for this step. Prime the entire surface and allow to dry, as per product instructions before applying the finish paint.
Again use a high quality outdoor paint. Apply 2 coats as per product instructions. After a couple of days use a utility knife and razor blade scraper to remove any paint that was on the glass.
You now have a beautiful exterior door, that will last for many years before painting is again required.