I try to debug an app inside of the container and I need to run django to run tests I do that by:
docker-compose exec django bash
But as a result I get:
service "django" is not running container #1
I don’t really understand what this response means and I didn’t find any information regarding that. This issue prevents me from being able to debug a code inside of the container with the database up and running.
3
Answers
Try to add in settings.py:
and
if docker ps show a container name "django"
then run if you want to get bash prompt in:
if bash not available you can try bin/sh
if container isn’t running you can’t go in.
I think you should check docker-compose.yaml
You wrote it:
Try this: