IPDB debugging
I have put a PDB in my code to debug and am using docker attach to connect to the web container. I hit the breakpoint but cant step through the code...
Ignore this. I needed to add:
stdin_open: true tty: true
to docker-compose.yaml for the web container.
Thanks. tty: true is already set here btw: https://github.com/nickjj/docker-django-example/blob/a8d071082217a7a0a41de2b687ce04dcf553cd0f/docker-compose.yml#L17
Are there any implications of leaving stdin_open: true set all the time? Which command did you run to attach to the container? Was it literally the docker attach command or did you exec into it?
I ran docker attach hellodjango-web-1. I also needed to increase the timeout of gunicorn.
Thanks, that's useful to know. Maybe that timeout can be set as an env var to make it easier to switch in dev vs prod.