File tree Expand file tree Collapse file tree 4 files changed +49
-4
lines changed Expand file tree Collapse file tree 4 files changed +49
-4
lines changed Original file line number Diff line number Diff line change 11__pycache__
22.git
3- .vscode /settings.json
3+ .vscode /*
4+ ! .vscode /launch.json
Original file line number Diff line number Diff line change 1+ {
2+ // Use IntelliSense to learn about possible attributes.
3+ // Hover to view descriptions of existing attributes.
4+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+ "version" : " 0.2.0" ,
6+ "configurations" : [
7+ {
8+ "name" : " Python Debugger: refinery-authorizer" ,
9+ "type" : " debugpy" ,
10+ "request" : " attach" ,
11+ "connect" : {
12+ "host" : " localhost" ,
13+ "port" : 15672
14+ },
15+ "pathMappings" : [
16+ {
17+ "localRoot" : " ${workspaceFolder}" ,
18+ "remoteRoot" : " ."
19+ }
20+ ]
21+ }
22+ ]
23+ }
Original file line number Diff line number Diff line change 11-r requirements.txt
22httpx == 0.25.0
3- pytest == 8.1.1
3+ pytest == 8.1.1
4+ debugpy == 1.8.12
Original file line number Diff line number Diff line change 11#! /bin/bash
2+
3+ DEBUG_MODE=false
4+ DEBUG_PORT=15672
5+
6+ while getopts d flag
7+ do
8+ case " ${flag} " in
9+ d) DEBUG_MODE=true;;
10+ esac
11+ done
12+
13+ CMD=" "
14+ if [ $DEBUG_MODE = true ]; then
15+ CMD=" debugpy --wait-for-client --listen 0.0.0.0:$DEBUG_PORT -m uvicorn main:app --host 0.0.0.0 --port 80 --reload"
16+ fi
17+
218trap " echo -ne '\nstopping container...' && docker stop refinery-authorizer > /dev/null 2>&1 && echo -ne '\t\t [done]\n'" EXIT
319
420echo -ne ' stopping old container...'
521docker stop refinery-authorizer > /dev/null 2>&1
622echo -ne ' \t [done]\n'
723
824echo -ne ' building container...'
9- docker build -t refinery-authorizer-dev -f dev.Dockerfile . > /dev/null 2>&1
25+ docker build -t refinery-authorizer-dev -f dev.Dockerfile .
1026echo -ne ' \t\t [done]\n'
1127
1228echo -ne ' starting...'
1329docker run -d --rm \
1430--name refinery-authorizer \
31+ -p $DEBUG_PORT :$DEBUG_PORT \
1532--network dev-setup_default \
16- refinery-authorizer-dev > /dev/null 2>&1
33+ refinery-authorizer-dev $CMD > /dev/null 2>&1
1734echo -ne ' \t\t\t [done]\n'
1835
36+ if [ $DEBUG_MODE = true ]; then
37+ echo -e " \033[0;33muse VSCode Debugger (Python Debugger: refinery-authorizer) to start the service\033[0m"
38+ fi
1939docker logs -f refinery-authorizer
You can’t perform that action at this time.
0 commit comments