@@ -116,7 +116,7 @@ above. The base images are built first, followed by the derived
116116` epidata ` -specific images.
117117
118118- The [ ` delphi_web_epidata ` image] ( https://github.com/cmu-delphi/delphi-epidata/blob/main/dev/docker/web/epidata/README.md ) adds
119- the Epidata API to the ` delphi_web ` image.
119+ the Epidata API to the ` delphi_web_epidata ` image.
120120- The
121121 [ ` delphi_database_epidata ` image] ( https://github.com/cmu-delphi/delphi-epidata/blob/main/dev/docker/database/epidata/README.md )
122122 adds user accounts, ` epidata ` & other appropriate databases, and relevant tables
@@ -125,14 +125,8 @@ above. The base images are built first, followed by the derived
125125From the root of your workspace, all of the images can be built as follows:
126126
127127``` bash
128- docker build -t delphi_web \
129- -f repos/delphi/operations/dev/docker/web/Dockerfile .
130-
131- docker build -t delphi_web_epidata \
132- -f repos/delphi/delphi-epidata/dev/docker/web/epidata/Dockerfile .
133-
134- docker build -t delphi_database \
135- -f repos/delphi/operations/dev/docker/database/Dockerfile .
128+ docker build -t delphi_web_epidata\
129+ -f ./devops/Dockerfile . ; \
136130
137131docker build -t delphi_database_epidata \
138132 -f repos/delphi/delphi-epidata/dev/docker/database/epidata/Dockerfile .
@@ -394,33 +388,3 @@ The command above maps two local directories into the container:
394388- ` /repos/delphi/delphi-epidata/src ` : Just the source code, which forms the
395389 container's ` delphi.epidata ` python package.
396390
397- ### server code
398-
399- Local web sources (e.g. PHP files) can be bind-mounted into a
400- ` delphi_web_epidata ` container as follows:
401-
402- ``` bash
403- docker run --rm -p 127.0.0.1:10080:80 \
404- --mount type=bind,source=" $( pwd) " /repos/delphi/delphi-epidata/src/server/api.php,target=/var/www/html/epidata/api.php,readonly \
405- --mount type=bind,source=" $( pwd) " /repos/delphi/delphi-epidata/src/server/api_helpers.php,target=/var/www/html/epidata/api_helpers.php,readonly \
406- --network delphi-net --name delphi_web_epidata \
407- delphi_web_epidata
408- ```
409-
410- The command above mounts two specific files into the image. It may be tempting
411- to bind mount the ` src/server ` directory rather than specific files, however
412- that is currently problematic for a couple of reasons:
413-
414- 1 . ` server/.htaccess ` [ from the local repository] ( https://github.com/cmu-delphi/delphi-epidata/blob/main/src/server/.htaccess ) uses
415- the ` Header ` directive. However, the webserver in the container doesn't have
416- the corresponding module enabled. This causes the server to deny access to
417- the API.
418- 2 . ` server/database_config.php `
419- [ in the image] ( https://github.com/cmu-delphi/delphi-epidata/blob/main/dev/docker/web/epidata/assets/database_config.php ) contains
420- database credentials for use in conjunction with the
421- ` delphi_database_epidata ` container during development. However, the same
422- file from [ the local repository] ( https://github.com/cmu-delphi/delphi-epidata/blob/main/src/server/database_config.php ) only
423- contains placeholder values. This prevents communication with the database.
424-
425- There is currently no benefit to bind-mounting sources into the database
426- container because schema changes require restarting the container anyway.
0 commit comments