To my knowledge, these things are often done manually, and a double face tape "gun" will be used to apply the glue. So it's not always glue but a tape that is used.
The glue usually goes on the smaller flaps because it's easier to measure its length and ensure it won't be visible at all.
Most printers prefer that flap to be at least 5/8" (0.625") since the tapes are often 0.25"-0.5" width. You should leave the area where the tape/glue will be in white, it will stick better!
But if you are working on a project that will be printed in huge quantities (eg. 5000+), the best is probably to ask the printer; it's possible they will use a mechanical process for this and will have different requirements (and more precision too).
The flap where the glue will be applied is usually on the pocket panel.
EXTRA: Anyway, if you are using a standard kind of folder, your printer will use a diecut he already has on hand and you should base your design on this dieline. Simply ask the printer for that dieline file.
drawing diecut line for chipboard and wrapping paper to form boxes
How should I set up dielines so that they are not printed?