Error launching traefik in docker desktop

Hi all, I have a problem, if you can take the time to help me it would be great please.
I've created a container that contains traefik and I've run the following command: docker compose up --build --force-recreate -d which shows me the first screenshot.
When I switch on the container, it shuts down with the following error message: {“level”: “error”, “error”: “command traefik error: field not found, node: swarmMode”, “time”: “2024-06-05T16:24:45Z”, “message”: “Command error”}.
n the third capture, I've put the contents of the yaml file

This has nothing to do with "Traefik Mesh" category you selected.

You run Traefik image without any version tag, so you now get latest v3, which moved swarmMode (migration doc) into an own
providers.swarm (doc).

Note that your command: has no effect, as you already provide a static config file (doc).

In the mean time (before migrating), you could try to use image: traefik:v2.11.

Thank you for taking the time to reply. I'll try what you said. Sorry, but I didn't know where to post as this is my first post. I'll delete it so as not to pollute the channel.