Adds --service-ports to docker compose run command for django unit tests so that debugger port is exposed for debug client connections.
Context
During the 10/25/2022 #dojo session we ran into a problem with local debug config that prevented connecting the VS Code debugger (client) to the debugpy server running in the app under test.
This appears to have been due to this quirk of the run command:
The second difference is that the docker compose run command does not create any of the ports specified in the service configuration. This prevents port collisions with already-open ports. If you do want the service’s ports to be created and mapped to the host, specify the --service-ports
(cf https://docs.docker.com/engine/reference/commandline/compose_run/#description)
Adds
--service-ports
todocker compose run
command for django unit tests so that debugger port is exposed for debug client connections.Context
During the 10/25/2022
#dojo
session we ran into a problem with local debug config that prevented connecting the VS Code debugger (client) to thedebugpy
server running in the app under test.This appears to have been due to this quirk of the
run
command: