Skip to content

Commit

Permalink
Use launch type debugger (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
thekaveman authored Oct 5, 2021
2 parents eb1fa17 + 2bc8bcc commit a688230
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
3 changes: 1 addition & 2 deletions .devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
"bash": {
"path": "/bin/bash"
}
},
"python.pythonPath": "/usr/local/bin/python",
}
},

// Add the IDs of extensions you want installed when the container is created.
Expand Down
11 changes: 6 additions & 5 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
{
"name": "Django: Benefits Client",
"type": "python",
"request": "attach",
"connect": {
"host": "localhost",
"port": 5678
},
"request": "launch",
"program": "${workspaceFolder}/manage.py",
"args": [
"runserver",
"0.0.0.0:8000"
],
"django": true
},
{
Expand Down
2 changes: 1 addition & 1 deletion localhost/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ USER root

RUN apt-get install -qq --no-install-recommends curl git jq ssh && \
python -m pip install --upgrade pip && \
pip install --no-cache-dir flake8 debugpy pre-commit
pip install --no-cache-dir flake8 pre-commit

# install node.js
# see https://github.com/nodesource/distributions#installation-instructions
Expand Down
5 changes: 2 additions & 3 deletions localhost/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,12 @@ services:
- DJANGO_INIT_PATH
- DJANGO_LOG_LEVEL
- DJANGO_SECRET_KEY
entrypoint: python
command: -m debugpy --wait-for-client --listen 0.0.0.0:5678 manage.py runserver 0.0.0.0:8000
entrypoint: []
command: sleep infinity
depends_on:
- server
ports:
- "8000"
- "5678"
volumes:
- ./data:/home/calitp/app/data:cached
- ../:/home/calitp/app:cached
Expand Down

0 comments on commit a688230

Please sign in to comment.