Optical solitary waves in thermal media with non-symmetric boundary conditions