We propose a compact binary model with an eccentric orbit to explain periodically active fast radio burst (FRB) sources, where the system consists of a neutron star (NS) with strong dipolar magnetic fields and a magnetic white dwarf (WD). In our model, the WD fills its Roche lobe at periastron, and mass transfer occurs from the WD to the NS around this point. The accreted material may be fragmented into a number of parts, which arrive at the NS at different times. The fragmented magnetized material may trigger magnetic reconnection near the NS surface. The electrons can be accelerated to an ultra-relativistic speed, and therefore the curvature radiation of the electrons can account for the burst activity. In this scenario, the duty cycle of burst activity is related to the orbital period of the binary. We show that such a model may work for duty cycles roughly from ten minutes to two days. For the recently reported 16.35-day periodicity of FRB 180916.J0158+65, our model does not naturally explain such a long duty cycle, since an extremely high eccentricity ($e>0.95$) is required.