  The recent detections of TeV gamma-rays from compact binary systems show that
relativistic outflows (jets or winds) are sites of effective acceleration of
particles up to multi-TeV energies. In this paper, we discuss the conditions of
acceleration and radiation of ultra-relativistic electrons in LS 5039, the
gamma-ray emitting binary system for which the highest quality TeV data are
available. Assuming that the gamma-ray emitter is a jet-like structure, we
performed detailed numerical calculations of the energy spectrum and
lightcurves accounting for the acceleration efficiency, the location of the
accelerator, the speed of the emitting flow, the inclination angle of the
system, as well as specific features related to anisotropic inverse Compton
scattering and pair production. We conclude that the accelerator should not be
deep inside the binary system unless we assume a very efficient acceleration
rate. We show that within the IC scenario both the gamma-ray spectrum and flux
are strongly orbital phase dependent. Formally, our model can reproduce, for
specific sets of parameter values, the energy spectrum of gamma-rays reported
by HESS for wide orbital phase intervals. However, the physical properties of
the source can be constrained only by observations capable of providing
detailed energy spectra for narrow orbital phase intervals ($\Delta\phi\ll
0.1$).
