You don't need a box to house the stuff in the circuit. It's actually spread out all over the bike!
Here is a photo of the 4 diodes soldered to a terminal strip mounted to the front reflector bracket.

My dynamo is the type that is grounded to the bicycle frame so the mounting tab provides contact to the frame ground with the other dynamo lead being the yellow wire. You can see the red and black DC wires going to the headlight.

This is a photo of my headlight. The resistor and capacitor is located behind the heat sink in the light and S1 is located on the handlebars.

This is a photo of the batteries strapped to the rear rack and a terminal strip with S2 and the resistor for the LED taillight. As I use a bottle type dynamo S2 is only used to disconnect the batteries to prevent slow discharge when the bike is not in use. If I were using a hub dynamo S2 would need to be located on or around the handlebars. This terminal strip is where I attached a modified USB extension cable for powering USB devices. This allows me to place the devices in a rack trunk bag where there well protected. I modified a 9.6-volt RC battery pack so 4 wires lead from the batteries to the terminal strip.
You will probably note that nothing is contained in water proof containers except for the headlight. All the components are passive devices and low DC voltage so nothing is harmed if it get wet. Nothing electrical in the headlight would be damaged if wet but the optics would get messed up as the water evaporated.
This is a photo of my dynamo.

It's mounted where I can easily engage and disengage it while riding.