Skip to content

Troubleshooting

Docker

Restart policy in a swarm

When the docker-swarm-production.yml swarm services have on-failure configured and the service fails to start up and become healthy, it'll get stuck in an infinite restart loop and block all other services from starting up. In a swarm, it's best to let the swarm handle all services and only set a delay.

See https://stackoverflow.com/a/56564483/2362944

Stack rollbacks

When you publish changes to a stack and there's at least one failure, the swarm will roll back those changes and revert to the old configuration.

However, the deployment recipe requires only a few essential services to be healthy before continuing with the release and this can either be with the new or rolled back configuration.

Redis .env configuration

A DigitalOcean managed Redis database only allows encrypted connections, so you need to explicitly enable that in the host variable by prefix the URL with tls://:

dotenv
REDIS_HOST=tls://smarthealth-app-trial…

References: