Since docker:19-dind uses TLS by default this docker-compose does not work ootb perfectly.
Portainer cannot connect to the daemon as TLS is enabled.
I found 2 solutions to make it work :
change docker:dind by docker:18-dind in docker-compose.yml
To connect Portainer to the daemon I got the certs from manager1 (in /certs/server by default) and gave them to Portainer to make a TLS connection.
I used MANAGER1_CONTAINER_IP:2376 to connect as the cert by default is apparently not valid for container name.
Since docker:19-dind uses TLS by default this docker-compose does not work ootb perfectly. Portainer cannot connect to the daemon as TLS is enabled.
I found 2 solutions to make it work :
change docker:dind by docker:18-dind in docker-compose.yml
To connect Portainer to the daemon I got the certs from manager1 (in /certs/server by default) and gave them to Portainer to make a TLS connection. I used MANAGER1_CONTAINER_IP:2376 to connect as the cert by default is apparently not valid for container name.