But the overall approach is lighter and poppier, appropriate to the tropical setting. Glover’s co-star, Rihanna, narrates the opening sequence, an animated history of the island framed as a folk legend and bedtime story, with a dash of fairy tale: she explains how young Deni (Glover) would come to her window every night to sing to her, as if she were some kind of Caribbean Rapunzel.

Now a struggling musician, Deni dreams of writing a song that will unite his people, though they seem a fairly close-knit community already — it’s the kind of place where everyone bids him a cheerful good morning as he hustles to the first of his many jobs, singing jingles on the radio. But it’s not all a fairy tale; the ruthless Red Cargo (Nonso Anozie, from “Game of Thrones”) rules the island with an iron fist, and machine gun-slinging men patrol his factory floors.

The plot of “Guava Island” is as thin as the Judy Garland-Mickey Rooney musicals of its distant heritage: Deni has planned a secret all-night music festival (not unlike, say, a secret musical film), but its attendees would consequently not work on Sunday, which is deeply unacceptable to Red Cargo. He offers Deni $10,000 to cancel the event, explaining, “I’m in charge of the people of this island. I have to do what’s best for everyone.” No prizes for guessing whether the show goes on, though the consequences of that decision carry more weight than usual.

Thus, it’s one of those stories where the musical numbers are “realistic” (kinda, sorta) because the protagonist is a musician, and Murai takes thankful pains to work the songs into the fabric of the narrative. Yet there’s not as much music as one might expect, considering the pedigrees of its stars. Aside from Deni’s radio songs, there are only a handful of musical numbers, most of them reworking existing Gambino tracks. (Rihanna, even more surprisingly, doesn’t sing at all.)

But there’s real juice to those sequences, which include a lovely, beachside rendering of “Summertime Magic” and a concert performance of “Saturday” that manages to stage the kind of joy that’s spontaneously captured in the best concert documentaries, like “Wattstax” and “Dave Chappelle’s Block Party.” Onstage, Deni frames his event as “a celebration of life — I want everyone here to feel as free as you possibly can tonight,” and above all else, “Guava Island” is a paean to the pleasures of taking it easy. “We live in paradise,” Deni fumes, “but none of us have time or means to actually live here!”