Skip to content

Commit

Permalink
Merge pull request #55 from esnet-security/topic/chriscummings/fix-ci…
Browse files Browse the repository at this point in the history
…-ports

fix: ci issues related to recent changes
  • Loading branch information
crankynetman authored Oct 28, 2024
2 parents 7f99060 + 0400c99 commit fec6c8c
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .idea/runConfigurations/Django_Debugger.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/runConfigurations/Translator_Debugger.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"request": "attach",
"connect": {
"host": "0.0.0.0",
"port": 3000
"port": 56780
},
"pathMappings": [
{
Expand All @@ -25,7 +25,7 @@
"request": "attach",
"connect": {
"host": "0.0.0.0",
"port": 3001
"port": 56781
},
"pathMappings": [
{
Expand Down
11 changes: 6 additions & 5 deletions compose.override.local.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
version: "3.4"

volumes:
local_postgres_data: {}
Expand All @@ -21,17 +20,19 @@ services:
test: ["CMD", "curl", "-f", "http://django:8000/process_expired/"]
ports:
- "8000"
- 3000:3000
- 56780:56780
environment:
# This can be set to either `debugpy` or `pycharm-pydevd` currently.
- DEBUG=${DEBUG}
- DEBUG=${DEBUG:-}

postgres:
volumes:
- local_postgres_data:/var/lib/postgresql/data:Z
- local_postgres_data_backups:/backups:z
env_file:
- ./.envs/.local/.postgres
deploy:
replicas: ${POSTGRES_ENABLED:-1}

docs:
image: scram_local_docs
Expand Down Expand Up @@ -65,10 +66,10 @@ services:
volumes:
- ./translator/tests/:/app/tests/
ports:
- 3001:3001
- 56781:56781
environment:
# This can be set to either `debugpy` or `pycharm-pydevd` currently.
- DEBUG=${DEBUG}
- DEBUG=${DEBUG:-}

networks:
default:
Expand Down
1 change: 0 additions & 1 deletion compose.override.production.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
version: '3.4'

volumes:
production_postgres_data: {}
Expand Down
1 change: 0 additions & 1 deletion compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
version: '3.4'

services:
django:
Expand Down
6 changes: 3 additions & 3 deletions config/asgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@

import pydevd_pycharm

pydevd_pycharm.settrace("host.docker.internal", port=3003, stdoutToServer=True, stderrToServer=True)
pydevd_pycharm.settrace("host.docker.internal", port=56783, stdoutToServer=True, stderrToServer=True)

logging.info("Debugger started.")
elif debug_mode == "debugpy":
logging.info("Entering debug mode for debugpy (VSCode)")

import debugpy

debugpy.listen(("0.0.0.0", 3000))
debugpy.listen(("0.0.0.0", 56780))

logging.info("Debugger listening on port 3000.")
logging.info("Debugger listening on port 56780.")
else:
logging.warning(f"Invalid debug mode given: {debug_mode}. Debugger not started")

Expand Down
6 changes: 3 additions & 3 deletions translator/translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def install_deps():

import pydevd_pycharm

pydevd_pycharm.settrace("host.docker.internal", port=3002, stdoutToServer=True, stderrToServer=True)
pydevd_pycharm.settrace("host.docker.internal", port=56782, stdoutToServer=True, stderrToServer=True)

logging.info("Debugger started.")
elif debug_mode == "debugpy":
Expand All @@ -46,9 +46,9 @@ def install_deps():

import debugpy

debugpy.listen(("0.0.0.0", 3001))
debugpy.listen(("0.0.0.0", 56781))

logging.info("Debugger listening on port 3001.")
logging.info("Debugger listening on port 56781.")
else:
logging.warning(f"Invalid debug mode given: {debug_mode}. Debugger not started")

Expand Down

0 comments on commit fec6c8c

Please sign in to comment.