Thanks both for your response.
My setup is macOS with Docker Desktop v27.4.0 and Docker Compose v2.31.0-desktop.2.
I just tested now and it works fine. I guess last night I was tired and I was pressing the wrong button. My '.yml' file looks the same as yours @mikalai.
Thanks very much for your time.