Skip to content

deleted *.php from /server and docs, deleted Dockerfile #1092

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions deploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,6 @@
"dst": "[[package]]/acquisition/cdcp/",
"match": "^.*\\.(py)$",
"add-header-comment": true
},{
"type": "move",
"src": "src/acquisition/cdcp/cdc_upload.php",
"dst": "[[auto_web]]/cdc_upload/index.php",
"add-header-comment": true
},

"// acquisition - ght",
Expand Down Expand Up @@ -107,16 +102,6 @@
"dst": "[[package]]/acquisition/wiki/",
"match": "^.*\\.(py)$",
"add-header-comment": true
},{
"type": "move",
"src": "src/acquisition/wiki/master.php",
"dst": "[[auto_web]]/wiki/master.php",
"add-header-comment": true
},{
"type": "move",
"src": "src/acquisition/wiki/dashboard.php",
"dst": "[[auto_web]]/wiki/index.php",
"add-header-comment": true
},

"// acquisition - flusurv",
Expand Down
11 changes: 0 additions & 11 deletions dev/docker/web/epidata/Dockerfile

This file was deleted.

22 changes: 0 additions & 22 deletions dev/docker/web/epidata/README.md

This file was deleted.

7 changes: 0 additions & 7 deletions dev/docker/web/epidata/assets/database_config.php

This file was deleted.

42 changes: 3 additions & 39 deletions docs/epidata_development.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ above. The base images are built first, followed by the derived
`epidata`-specific images.

- The [`delphi_web_epidata` image](https://github.com/cmu-delphi/delphi-epidata/blob/main/dev/docker/web/epidata/README.md) adds
the Epidata API to the `delphi_web` image.
the Epidata API to the `delphi_web_epidata` image.
- The
[`delphi_database_epidata` image](https://github.com/cmu-delphi/delphi-epidata/blob/main/dev/docker/database/epidata/README.md)
adds user accounts, `epidata` & other appropriate databases, and relevant tables
Expand All @@ -125,14 +125,8 @@ above. The base images are built first, followed by the derived
From the root of your workspace, all of the images can be built as follows:

```bash
docker build -t delphi_web \
-f repos/delphi/operations/dev/docker/web/Dockerfile .

docker build -t delphi_web_epidata \
-f repos/delphi/delphi-epidata/dev/docker/web/epidata/Dockerfile .

docker build -t delphi_database \
-f repos/delphi/operations/dev/docker/database/Dockerfile .
docker build -t delphi_web_epidata\
-f ./devops/Dockerfile .;\

docker build -t delphi_database_epidata \
-f repos/delphi/delphi-epidata/dev/docker/database/epidata/Dockerfile .
Expand Down Expand Up @@ -394,33 +388,3 @@ The command above maps two local directories into the container:
- `/repos/delphi/delphi-epidata/src`: Just the source code, which forms the
container's `delphi.epidata` python package.

### server code

Local web sources (e.g. PHP files) can be bind-mounted into a
`delphi_web_epidata` container as follows:

```bash
docker run --rm -p 127.0.0.1:10080:80 \
--mount type=bind,source="$(pwd)"/repos/delphi/delphi-epidata/src/server/api.php,target=/var/www/html/epidata/api.php,readonly \
--mount type=bind,source="$(pwd)"/repos/delphi/delphi-epidata/src/server/api_helpers.php,target=/var/www/html/epidata/api_helpers.php,readonly \
--network delphi-net --name delphi_web_epidata \
delphi_web_epidata
```

The command above mounts two specific files into the image. It may be tempting
to bind mount the `src/server` directory rather than specific files, however
that is currently problematic for a couple of reasons:

1. `server/.htaccess` [from the local repository](https://github.com/cmu-delphi/delphi-epidata/blob/main/src/server/.htaccess) uses
the `Header` directive. However, the webserver in the container doesn't have
the corresponding module enabled. This causes the server to deny access to
the API.
2. `server/database_config.php`
[in the image](https://github.com/cmu-delphi/delphi-epidata/blob/main/dev/docker/web/epidata/assets/database_config.php) contains
database credentials for use in conjunction with the
`delphi_database_epidata` container during development. However, the same
file from [the local repository](https://github.com/cmu-delphi/delphi-epidata/blob/main/src/server/database_config.php) only
contains placeholder values. This prevents communication with the database.

There is currently no benefit to bind-mounting sources into the database
container because schema changes require restarting the container anyway.
6 changes: 2 additions & 4 deletions docs/new_endpoint_tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,8 @@ already built the `delphi_python` image above:

```bash
# build web and database images for epidata
docker build -t delphi_web \
-f repos/delphi/operations/dev/docker/web/Dockerfile .
docker build -t delphi_web_epidata \
-f repos/delphi/delphi-epidata/dev/docker/web/epidata/Dockerfile .
docker build -t delphi_web_epidata\
-f ./devops/Dockerfile .;\
docker build -t delphi_database_epidata \
-f repos/delphi/delphi-epidata/dev/docker/database/epidata/Dockerfile .

Expand Down
101 changes: 0 additions & 101 deletions src/acquisition/cdcp/cdc_upload.php

This file was deleted.

Loading