If you’re looking for something nice, friendly and down-the-middle to see with your family over the holiday weekend, “Green Book” would be a good bet.

I don’t mean that as a dig. Sometimes you’ve got to see a movie with the whole family when they’re in town, and it’s hard to find something that everyone will like. A warm, well-intended crowd-pleaser like this is nothing to turn up your nose at. Even if it’s a little goofy, broad and simplistic.

“Green Book” is based on a true story of renowned black composer and pianist Don Shirley (Mahershala Ali). The film follows the music tour he took through the Deep South in 1962. Shirley is accompanied by his chauffeur and bodyguard, New York City bouncer Frank “Tony Lip” Vallelonga (Viggo Mortensen). Tony is good at dealing with trouble. And a black man in the South in the ’60s? Yeah, they’ve got a chance of running into trouble.

“Green Book” takes the tried-and-true road movie template to tell the story of their burgeoning friendship. It’s the first drama from Peter Farrelly, one half of the Farrelly brothers directing duo behind such comedy classics as “Dumb and Dumber,” “Kingpin” and “There’s Something About Mary.”

Farrelly co-wrote the script with Brian Hayes Currie and Nick Vallelonga, Tony’s son. Tony and Shirley (who stayed lifelong friends before they died a few months apart in 2013) told Nick all the stories of their travels, and, according to family legend, this is how it all went down.

At the start of the film, Tony is a man of his time, a blatant racist. After his wife, Dolores (Linda Cardellini), offers water to two black repairmen, Tony throws away the glasses.

So Tony accepts the job of driving a black man around the South with some reluctance. And Shirley isn’t exactly taken with Tony’s coarse personality. But Tony needs the money, and Shirley needs a guy who can handle himself.

The trip has its funny (if at times tone-deaf, cringe-inducing) moments — like when Tony persuades Shirley to try Kentucky Fried Chicken for the first time. And it has its upsetting detours — Shirley being beaten and harassed by locals and police.

The “Green Book” of the title is the “The Negro Motorist Green Book,” a guide for black travelers that identified where they could go for food and lodgings. Shirley’s manager gives Tony the book at the start of their trip, and the further they drive into the deeply segregated South, the narrower Shirley’s dining and hotel options become.

As NBC’s movie critic Jenni Miller noted, “Green Book” is “a movie about racism, made by white people for white people.”

I agree with that. But I also believe that the film is unwaveringly good-hearted and well-intended. That this is a story worth telling, however dopily it’s told. And that there are a lot of white people out there who could stand to be reminded of the injustices that black people have faced and continue to face in America.

If there’s an arc to “Green Book,” it’s that of Tony, who over the course of the film goes from being racist to not being racist. He and Shirley’s friendship grows out of mutual respect. It’s surely a simplified version of a complicated relationship. But that doesn’t make it any less heartwarming.

The film is unquestionably elevated by Ali’s and Mortensen’s star power, as well as their undeniable chemistry.

Ali plays Shirley as quiet and dignified, with a current of rage simmering just beneath the surface.

Mortensen has the taller task, having to humanize a compendium of Italian caricatures. The man is a cartoon. He says thing like, “Eyyyy, why ya bustin’ my balls?” In one scene, he eats a rolled-up pizza in bed, wearing nothing but his underwear and undershirt. But Mortensen pulls it off somehow, even in the groan-inducing scenes with his extended family, which play out with all the subtlety of an Olive Garden commercial from the ’90s.

Telling this story predominantly from Tony’s perspective would have been more of a problem, had “Green Book” not done such a good job developing their friendship and making Shirley the richer, more complex character. And Tony’s evolution is what drives the film’s optimism. If this guy can change his bad ideas, maybe others can, too.

“Green Book” is a slice of hope in a not especially hopeful time. We go to the movies for a lot of reasons, but that’s one of the big ones.