Skip to content

Commit 3055648

Browse files
committed
use python3.9 docker to avoid 'address already in use' issue - 3.10, 3.11, and up has such issue, also make selenium tests debugable on high port (10679)
1 parent 656162f commit 3055648

File tree

5 files changed

+17
-10
lines changed

5 files changed

+17
-10
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Please review our SDK documentation for more information and additional features
6464

6565
Debugging server component
6666
--------------------------
67-
debugpy remote debugging enabled on port 5678 for server in docker compose, developer can attach to server from IDE e.g. vscode.
67+
debugpy remote debugging enabled on port 10678 for server in docker compose, developer can attach to server from IDE e.g. vscode.
6868

6969
Error Responses and handling:
7070
-----------------------------

docker-compose.selenium.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ services:
88
- DANGEROUSLY_DISABLE_HOST_CHECK=true
99
ports:
1010
- "3001:3001"
11-
- "5678:5678"
11+
- "10678:10678"
1212
client:
1313
build:
1414
context: ./client
@@ -27,6 +27,17 @@ services:
2727
- chrome
2828
- server
2929
- client
30+
selenium-tests-debug:
31+
build:
32+
context: ./selenium_tests
33+
dockerfile: ./Dockerfile
34+
command: python3 -m debugpy --listen 0.0.0.0:10679 --wait-for-client -m pytest ./src/test_python_sample.py
35+
ports:
36+
- "10679:10679"
37+
depends_on:
38+
- chrome
39+
- server
40+
- client
3041
chrome:
3142
image: selenium/standalone-chrome-debug
3243
hostname: chrome

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ services:
55
dockerfile: ./Dockerfile
66
args:
77
BUILD_DEVELOPMENT: ${BUILD_DEVELOPMENT}
8-
command: bash -c "python -m debugpy --listen 0.0.0.0:5678 app.py"
8+
command: bash -c "python -m debugpy --listen 0.0.0.0:10678 app.py"
99
ports:
1010
- "3001:3001"
11-
- "5678:5678"
11+
- "10678:10678"
1212
volumes:
1313
- ./server:/server
1414
client:

selenium_tests/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ ADD . /code/
99
WORKDIR /code
1010
RUN ln -s /usr/bin/python3 /usr/local/bin/python
1111
RUN pip3 install --upgrade pip
12-
RUN pip3 install selenium pytest
12+
RUN pip3 install selenium pytest debugpy

server/Dockerfile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM --platform=linux/amd64 python:3.11
1+
FROM python:3.9
22

33
ARG BUILD_DEVELOPMENT="False"
44

@@ -21,7 +21,3 @@ RUN if [ "$BUILD_DEVELOPMENT" = "True" ]; then \
2121

2222
RUN pipenv lock
2323
RUN pipenv install --system --deploy --ignore-pipfile
24-
25-
# EXPOSE 3001
26-
27-
# CMD ["sh", "-c", "python -m debugpy --listen 0.0.0.0:5678 app.py"]

0 commit comments

Comments
 (0)