diff --git a/docker/docker-compose-debug.yml b/docker/docker-compose-debug.yml index b913be70b..b6f488df0 100644 --- a/docker/docker-compose-debug.yml +++ b/docker/docker-compose-debug.yml @@ -1,11 +1,14 @@ -version: '3' +version: "3" services: vcr-api: - command: ["sh", "-c", "pip install debugpy -t /tmp && python ./manage.py migrate && python /tmp/debugpy --wait-for-client --listen 0.0.0.0:5678 ./manage.py runserver 0.0.0.0:8080"] + environment: + - DEBUGPY=${DEBUGPY} + command: > + sh -c "python ./manage.py migrate && if [ ! -z $DEBUGPY ]; then pip install debugpy -t /tmp && python /tmp/debugpy --wait-for-client --listen 0.0.0.0:5678 ./manage.py runserver 0.0.0.0:8080; else python ./manage.py runserver 0.0.0.0:8080; fi" volumes: - ../server/vcr-server/vcr_server:/opt/app-root/src/vcr_server - ../server/vcr-server/subscriptions:/opt/app-root/src/subscriptions - ../server/vcr-server/agent_webhooks:/opt/app-root/src/agent_webhooks - ../server/vcr-server/api:/opt/app-root/src/api ports: - - 5678:5678 \ No newline at end of file + - 5678:5678