Is it true that was we were soldiers based on a true story based on the following text?

We Were Soldiers is a 2002 American war film that dramatizes the Battle of Ia Drang on November 14, 1965. The film was directed by Randall Wallace and stars Mel Gibson. It is based on the book We Were Soldiers Once... And Young (1992) by Lieutenant General (Ret.) Hal Moore and reporter Joseph L. Galloway, both of whom were at the battle.
yes