How to create replicas in docker-compose when `scale` is deprecated?
@decoomanj on github indicated that scale has to be replaced by deploy in conjunction with replicas. 

According to mrampant-nist on github one has to use --compatibility as well.

Let's test this. First of all all docker-compose.yml is needed:

version: '3.3'
services:
    nginx:
      image: nginx
      scale: 6


and issuing:

docker-compose up


results in:

ERROR: The Compose file './docker-compose.yml' is invalid because:
Unsupported config option for services.nginx: 'scale'


Applying @decoomanj's suggestion, i.e. replacing replicas:

version: '3.3'
services:
    nginx:
      image: nginx
      deploy:
        replicas: 6


results in:

WARNING: Some services (nginx) use the 'deploy' key, which will be ignored. Compose does not support 'deploy' configuration - use `docker stack deploy` to deploy to a swarm.


Running docker-compose --compatibility up starts 6 services:

CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS               NAMES
f19aa54634d7        nginx               "nginx -g 'daemon of…"   5 seconds ago       Up 4 seconds        80/tcp              6233_nginx_5
749cff4ac1c3        nginx               "nginx -g 'daemon of…"   5 seconds ago       Up 3 seconds        80/tcp              6233_nginx_3
b86ed7b217fe        nginx               "nginx -g 'daemon of…"   5 seconds ago       Up 1 second         80/tcp              6233_nginx_6
0b92e5ef4a0e        nginx               "nginx -g 'daemon of…"   5 seconds ago       Up 2 seconds        80/tcp              6233_nginx_2
e414bca52b53        nginx               "nginx -g 'daemon of…"   5 seconds ago       Up 4 seconds        80/tcp              6233_nginx_4
e9f33dc634a8        nginx               "nginx -g 'daemon of…"   6 seconds ago       Up 5 seconds        80/tcp              6233_nginx_1


In conclusion, replicas has to be replaced by deploy and replicas and --compatibility is needed to solve the issue.