I'm not a pro at Docker, but I've spun up over 30 different services using Docker Compose so I'm more than a novice. I would say that Lemmy's documentation is the worst I've ever seen.
The website points you at that compose file which is (I think?) designed for Ansible. I think there's another example somewhere without all the jibbery joo, but I can't search for it right now.
Edit: here it is https://github.com/LemmyNet/lemmy/blob/main/docker/docker-compose.yml
No idea why they don't link to that one in the first place. I'd fix it if I knew how.