Swarm mode giving 404

Two things are missing here:

Regarding point two, for the dashboard/api you need to create a dummy service and put some port on it. An example is here