Since many Docker Compose users have complained about this incompatibility of compose v3 vs v2, the team has developed compatibility mode.
You can retain the same deploy structure that you provided and it will not be ignored, simply by adding the –compatibility flag to the docker-compose command (docker-compose –compatibility up), as explained here. I tested this with version 3.5 and verified with docker stats and can confirm that it works.