I have epoxied them onto my lights before and they work fine but those are much smaller vials (1.5x6mm) and I have them at $7.28 a piece. You just have to make sure some of the epoxy covers the surface of the vial. That being said, I don’t use excessive force on my lights so mileage may differ.
Some use them for gun sights, pendants, the possibilities are quite endless.