Problem with Scale-ing Docker Compose

I try docker-compose scale mweb=2, to make mweb container become 2 instance.

i got this

mervo@SharkBay:~/mywork/nge-docker/sjpa-duo$ docker-compose scale mweb=2
WARNING: The “mweb” service is using the custom container name “mweb”. Docker requires each container to have a unique name. Remove the custom name to scale the service.
WARNING: The “mweb” service specifies a port on the host. If multiple containers for this service are created on a single host, the port will clash.
Creating and starting 1 … done
Creating and starting 2 … error

ERROR: for 2 Could not find container for entity id f6431016e05ae831b2ba914df51ae44092e35a8c8137fa3021e755c84e6e3f0c

We use springboot, and this is our code

By convention, while scaling docker containers , docker names the linked container based of the root folder name.
As you have given custom name for for scaling image , docker can’t spawn container with unique name.

Remove your “container_name” tag from docker-compose file.