Boundary effects in the three-dimensional Ising model