We present an extended dynamic equilibrium framework describing the simultaneous evolution of aggregate economic variables, of the Covid-19 reproduction index and of the lockdown measure. We prove the existence and uniqueness of the stationary solution and characterize its stability features. We also perform some comparative statics exercises in order to test how epidemiological and economic variables are affected by public containment measures. Namely, more restrictive lockdowns accelerate the process of absorption of the pandemic but slows down economic activity. When public spending financed through income taxation and reinvested entirely in public spending on health is accounted, there is an optimal level of the tax rate that minimizes fatalities. We also characterize the optimal stationary lockdown trading-off health needs, which require reinforced containment measures, and economic needs, which instead require relatively high degrees of opening of the economic activity.