Skip to content

Commit b823f09

Browse files
authored
Merge pull request #1029 from cmu-delphi/krivard/makefile-additions
Add live debugging targets to local dev Makefile
2 parents 7d284ad + 884d5f5 commit b823f09

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

dev/local/Makefile

+14
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,20 @@ test:
139139
--env "FLASK_SECRET=abc" \
140140
delphi_web_python python -m pytest --import-mode importlib $(pdb) $(test) | tee test_output_$(NOW).log
141141

142+
.PHONY=bash
143+
bash:
144+
@docker run -it --rm --network delphi-net \
145+
--mount type=bind,source=$(CWD)repos/delphi/delphi-epidata,target=/usr/src/app/repos/delphi/delphi-epidata,readonly \
146+
--mount type=bind,source=$(CWD)repos/delphi/delphi-epidata/src,target=/usr/src/app/delphi/epidata,readonly \
147+
--env "SQLALCHEMY_DATABASE_URI=mysql+mysqldb://user:pass@delphi_database_epidata:3306/epidata" \
148+
--env "FLASK_SECRET=abc" \
149+
delphi_web_python bash
150+
151+
.PHONY=sql
152+
sql:
153+
@docker run --rm -it --network delphi-net --cap-add=sys_nice \
154+
percona mysql --user=user --password=pass --port 3306 --host delphi_database_epidata epidata
155+
142156
.PHONY=clean
143157
clean:
144158
@docker images -f "dangling=true" -q | xargs docker rmi >/dev/null 2>&1

0 commit comments

Comments
 (0)