U
U
un1t2016-08-03 17:16:13
Django
un1t, 2016-08-03 17:16:13

How to use pdb in docker-compose?

The docker site has this example for Django:

version: '2'
services:
  db:
    image: postgres
  web:
    build: .
    command: python manage.py runserver 0.0.0.0:8000
    volumes:
      - .:/code
    ports:
      - "8000:8000"
    depends_on:
      - db

Only it is not clear how to work with pdb here.
On the Internet they write that you need to run it like this:
docker-compose run --service-ports web
Can this somehow be written in docker-compose.yml?
There is no point in doing run for such a config. the app is already running via docker-compose up.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
osipov_am, 2019-07-18
@osipov_am

https://medium.com/@vladyslav.krylasov/how-to-use-...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question