This is interesting. I just retried the whole setup and things are working well.
May I know what docker and docker-compose version are you using? Mine is 18.09.7 and 1.17.1, respectively.
When you build with docker stack, are you using the compose file as well? I tried it before and I have to rework the compose file almost completely.