Exact solutions of electromagnetic fields in an accelerated dielectric medium are found. In a frame of reference moving with the medium these solutions refer to the simplest metric in a nonpermanent gravitational field. The bending of a light beam and the gravitational Doppler shift are derived from the solutions. Addition laws for the energy velocities and phase velocities are also found.