Epitaxial growth of semiconductor alloys onto a fixed substrate has become the method of choice to make high quality crystals. In the coherent epitaxial growth, the lattice mismatch between the alloy film and the substrate induces a particular form of strain, adding a strain energy term into the free energy of the alloy system. Such epitaxial strain energy can alter the thermodynamics of the alloy, leading to a different phase diagram and different atomic microstructures. In this paper, we present a general-purpose mixed-basis cluster expansion method to describe the thermodynamics of an epitaxial alloy, where the formation energy of a structure is expressed in terms of pair and many-body interactions. With a finite number of first-principles calculation inputs, our method can predict the energies of various atomic structures with an accuracy comparable to that of first-principles calculations themselves. Epitaxial (In, Ga)N zinc-blende alloy grown on GaN(001) substrate is taken as an example to demonstrate the details of the method. Two (210) superlattice structures, (InN)(2)/(GaN)(2) (at x = 0.50) and (InN)(4)/(GaN)(1) (at x = 0.80), are identified as the ground state structures, in contrast to the phase-separation behavior of the bulk alloy.