You can easily build this circuit on a general purpose PCB and enclose in a protected box. The box needs to have sufficient area for installing transformer X1 and also two relays. It could be installed near 230V AC, 50Hz power supply or mounted on the PVC tube applied in assembly of the traffic light box.