Well, according to docs the mem_limit: 128m directive is available in v2 not in v3.
https://docs.docker.com/compose/compose-file/compose-file-v3/
Dunno if it's relevant at all...
If you use JetBrains IDE like GoLand or Webstorm, there is a schema mapping helping you to compose a file. If you selected docker-compose.yml schema and then switch version: from "3.9" to "2.4" it shows you the unavailable directive. It's really helpful in case you didn't know.
Well, according to docs the mem_limit: 128m directive is available in v2 not in v3.
https://docs.docker.com/compose/compose-file/compose-file-v3/
Dunno if it's relevant at all...
If you use JetBrains IDE like GoLand or Webstorm, there is a schema mapping helping you to compose a file. If you selected docker-compose.yml schema and then switch version: from "3.9" to "2.4" it shows you the unavailable directive. It's really helpful in case you didn't know.