You should become familiar with Docker Swarm official documentation on how a Docker Swarm operates. But the following docker commands are helpful when SSH'ing into your manager node to debug infrastructure issues.
To check the status of all running services
docker service ls
To scale a service that hasn't started, in order to check for bugs
docker service scale <service name e.g.: "opencrvs_metrics">=1
You want to get all stack information and see if there are any errors
docker stack ps opencrvs —no-trunc
To check the logs on a service
docker service logs <service name e.g.: "opencrvs_metrics">
To check logs or access a specific container
You need to check Docker swarm for the id of the containers running mongo, elasticsearch or resources in order to access To find which node hosts the container you are looking for, run this command on the manager node.