Skip to content

How to debug docker compose application

Cintia Del Rio Calvo edited this page Oct 26, 2017 · 1 revision

Support for dockerised environments

Note: that all configuration is automated, so you should not install or modify any configuration on the machine itself.

Deployment logs

All applications/docker-compose files will be in /root/docker.

In order to see the application logs, you can use docker-compose logs:

$ cd /root/docker/<your-env>  # your-env being modules-refapp, for example
$ docker-compose logs --tail 100 --follow

Restarting apps

The preferable way to redeploy or reset any environment is following the builds described in https://wiki.openmrs.org/x/-oO8Bg. A deployment will create a deploy.log file inside the /root/docker/<your-env>.

Manually, you can destroy and recreate the containers using deploy-compose <your-env>

Most environments are configured to be reset/redeployed when a new image is deployed to dockerhub, using webhooks.

If docker service on the host is unhealthy for any reason, you can restart it:

$ docker ps
$ systemctl restart docker

Troubleshooting errors

Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 127.0.1.1:53: server misbehaving

It means that the DNS on the host is unhealthy. Change /etc/resolv.conf to 8.8.8.8 and see if that solves the problem, or find out why dnsmasq is not behaving as it should.

Clone this wiki locally