Skip to content

Debugging container deployments via docker compose

Abhilash Raj edited this page Nov 15, 2020 · 1 revision

This page is a shared collection of debugging commands that can be used to figure out failing deployments:

Check container startup logs

Usually, when running docker-compose up -d the container logs are printed on stdout, but if you are using -d to run the containers in background, it might not.

To view the logs, you can run:

docker-compose logs mailman-core -f

You can replace mailman-core with mailman-web or database to check the startup logs for the containers to see any errors there. Note that once application starts up, you won't see any logs from applications there, it is only for the container startup.

Check containers are up

You can check if the containers are up or not using:

docker-compose ps

Check application logs

If you are using the default provided docker-compose.yaml file, you can check the logs on the host at the following locations:

  • Mailman Core: /opt/mailman/core/var/logs/mailman.log (and other .log files in this location)
  • Mailman Web: /opt/mailman/web/logs/mailmanweb.log

Check connection to Mailman

Mailman Core

Mailman Core is typically listening on http://172.19.199.2:8001 if you are using the default compose. To test a connection to the Core's API, you can run:

curl -u <username>:<password> http://172.19.199.2:8001/3.1/system

Mailman Web

Mailman Web is a Django application running using uwsgi typically running at http://172.19.199.3:8000. You can test it by running:

curl http://172.19.199.3:8000/postorius/lists/