@@ -101,8 +101,11 @@ web:
101
101
--network delphi-net --name delphi_web_epidata \
102
102
delphi_web_epidata >$(LOG_WEB) 2>&1 &
103
103
104
- .PHONY =web_debug
105
- web_debug :
104
+ .PHONY =web_vscodedebug
105
+ web_vscodedebug :
106
+ @# Full giude can be found by the link below:
107
+ @# https://docs.google.com/presentation/d/1RMxsPO3uYqjAqBNzhDJTtLM0Xglm7kAijFi2W2tzd6U/edit?usp=sharing
108
+
106
109
@# Stop container if running
107
110
@if [ $(WEB_CONTAINER_ID) ]; then\
108
111
docker stop $(WEB_CONTAINER_ID);\
@@ -121,9 +124,11 @@ web_debug:
121
124
@# Run the web server
122
125
@# MODULE_NAME specifies the location of the `app` variable, the actual WSGI application object to run.
123
126
@# see https://github.com/tiangolo/meinheld-gunicorn-docker#module_name
127
+
128
+ @# mount the debuging start script (start_vscodedebug.sh) into the container so the webserver uses it
124
129
@docker run --rm -p 127.0.0.1:5000:5000 -p 127.0.0.1:5678:5678 \
125
130
$(M1) \
126
- --mount type=bind,source=$(CWD)repos/delphi/delphi-epidata/devops/start .sh,target=/start .sh,readonly \
131
+ --mount type=bind,source=$(CWD)repos/delphi/delphi-epidata/devops/start_vscodedebug .sh,target=/start_vscodedebug .sh,readonly \
127
132
--mount type=bind,source=$(CWD)repos/delphi/delphi-epidata/src/server,target=/app/delphi/epidata/server \
128
133
--env "MODULE_NAME=delphi.epidata.server.main" \
129
134
--env "SQLALCHEMY_DATABASE_URI=$(sqlalchemy_uri)" \
171
176
all : db web py
172
177
173
178
.PHONY =debug
174
- debug : db web_debug py
179
+ debug : db web_vscodedebug py
175
180
176
181
.PHONY =test
177
182
test :
0 commit comments