Neurotransmitter release from neuronal terminals is governed by synaptic vesicle fusion. Vesicles filled with transmitters are docked at the neuronal membrane by means of the SNARE machinery. After a series of events leading up to the fusion pore formation, neurotransmitters are released into the synaptic cleft. In this paper, we study the mechanics of the docking process. A continuum model is used to determine the deformation of a spherical vesicle and a plasma membrane, under the influence of SNARE-machinery forces and electrostatic repulsion. Our analysis provides information on the variation of in-plane stress in the membranes, which is known to affect fusion. Also, a simple model is proposed to study hemifusion.