The olive tree is used to typically dry climates, but it does like to be watered deeply. Leave enough time between waterings so that the top 5 cm of soil has completely dried out and then make sure you’re really soaking the soil.
Although this is usually fruit producing tree, don’t expect a bumper crop of olives. According to the experts, the olive tree need to be outside for a few months in order to set fruit (it has to do with the change in temperatures), so your mileage may vary. Olive trees that may produce fruit indoors are the Arbequina, a slow growing “weeping” olive tree, and the Picholine.