Yes it is possible, because if you put a magnet on the door and another magnet on the surface with the north pole of the magnets or with the south pole of the magnets facing towards each other. We know that when two magnets repel each other when the magnets have the same pole towards each other. If you want close a door firmly, then you have to use strong magnets. Put the poles of the magnets of different direction towards each other. We know that when two opposite poles are kept close to each other and attract.