|
10 | 10 | # Creates all prereq images (delphi_database, delphi_python) only if they don't
|
11 | 11 | # exist. If you need to rebuild a prereq, you're probably doing something
|
12 | 12 | # complicated, and can figure out the rebuild command on your own.
|
13 |
| -# |
14 |
| -# |
| 13 | +# |
| 14 | +# |
15 | 15 | # Commands:
|
16 |
| -# |
| 16 | +# |
17 | 17 | # web: Stops currently-running delphi_web_epidata instances, if any.
|
18 | 18 | # Rebuilds delphi_web_epidata image.
|
19 | 19 | # Runs image in the background and pipes stdout to a log file.
|
20 |
| -# |
| 20 | +# |
21 | 21 | # db: Stops currently-running delphi_database_epidata instances, if any.
|
22 | 22 | # Rebuilds delphi_database_epidata image.
|
23 | 23 | # Runs image in the background and pipes stdout to a log file.
|
24 | 24 | # Blocks until database is ready to receive connections.
|
25 |
| -# |
| 25 | +# |
26 | 26 | # python: Rebuilds delphi_web_python image. You shouldn't need to do this
|
27 | 27 | # often; only if you are installing a new environment, or have
|
28 | 28 | # made changes to delphi-epidata/dev/docker/python/Dockerfile.
|
|
35 | 35 | #
|
36 | 36 | # clean: Cleans up dangling Docker images.
|
37 | 37 | #
|
38 |
| -# |
| 38 | +# |
39 | 39 | # Optional arguments:
|
40 | 40 | # pdb=1 Drops you into debug mode upon test failure, if running tests.
|
41 | 41 | # test= Only runs tests in the directories provided here, e.g.
|
|
105 | 105 | @# Run the database
|
106 | 106 | @docker run --rm -p 127.0.0.1:13306:3306 \
|
107 | 107 | --network delphi-net --name delphi_database_epidata \
|
| 108 | + --cap-add=sys_nice \ |
108 | 109 | delphi_database_epidata >$(LOG_DB) 2>&1 &
|
109 | 110 |
|
110 | 111 | @# Block until DB is ready
|
|
127 | 128 | all: web db py
|
128 | 129 |
|
129 | 130 | .PHONY=test
|
130 |
| -test: |
| 131 | +test: |
131 | 132 | @docker run -i --rm --network delphi-net \
|
132 | 133 | --mount type=bind,source=$(CWD)repos/delphi/delphi-epidata,target=/usr/src/app/repos/delphi/delphi-epidata,readonly \
|
133 | 134 | --mount type=bind,source=$(CWD)repos/delphi/delphi-epidata/src,target=/usr/src/app/delphi/epidata,readonly \
|
|
0 commit comments