We develop a minimal self-gravitating model for pulsar glitches by introducing a solid-crust potential in the three-dimensional Gross-Pitaevskii-Poisson equation, which we have used earlier to study gravitationally bound Bose-Einstein condensates, i.e., bosonic stars. In the absence of the crust potential, we show that, if we rotate such a bosonic star, it is threaded by vortices. We then show, via extensive direct numerical simulations, that the interaction of these vortices with the crust potential yields (a) stick-slip dynamics and (b) dynamical glitches. We demonstrate that, if enough momentum is transferred to the crust from the bosonic star, then the vortices are expelled from the star, and the crust's angular momentum ${J}_{c}$ exhibits features that may be interpreted as glitches. From the time series of ${J}_{c}$, we compute the cumulative probability distribution functions (CPDFs) of event sizes, event durations, and waiting times, which are consistent with the previous work. We show that these CPDFs have signatures of self-organized criticality, which are similar to those seen in observations of pulsar glitches and are consistent with previous work.