The city council, or board of trustees in towns, shall have power to regulate or prevent the storage and transportation of gunpowder, tar, pitch . . . or any of the products thereof, and other combustible or explosive material, within the corporate limits, and prescribe the limits within which any such regulations shall apply. Also to regulate the use of lights in stables, shops and other places, and to prevent the building of bonfires; and also to regulate or prevent the storage of gunpowder and other high explosives within the corporate limits and other high explosives within the corporate limits, or within one mile of the outer boundaries thereof. Also, to regulate and restrain the use of fireworks, fire crackers, torpedos, Roman candles, sky-rockets and other pyrotechnic displays.