-
Notifications
You must be signed in to change notification settings - Fork 67
Add support for src/common directory #1104
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
Conversation
@melange396 @krivard this is potentially an extremely breaking change, so if there's any way to test this besides making sure that the usual tests pass (which they do), please let me know! |
we can try deploying to staging, which should be a much closer approximation to the production environment than the dev docker images are, right @korlaxxalrok ? |
@@ -61,7 +61,7 @@ jobs: | |||
run: | | |||
docker network create --driver bridge delphi-net | |||
docker run --rm -d -p 13306:3306 --network delphi-net --name delphi_database_epidata --cap-add=sys_nice delphi_database_epidata | |||
docker run --rm -d -p 10080:80 --env "SQLALCHEMY_DATABASE_URI=mysql+mysqldb://user:pass@delphi_database_epidata:3306/epidata" --env "FLASK_SECRET=abc" --env "FLASK_PREFIX=/epidata" --network delphi-net --name delphi_web_epidata delphi_web_epidata | |||
docker run --rm -d -p 10080:80 --env "MODULE_NAME=delphi.epidata.server.main" --env "SQLALCHEMY_DATABASE_URI=mysql+mysqldb://user:pass@delphi_database_epidata:3306/epidata" --env "FLASK_SECRET=abc" --env "FLASK_PREFIX=/epidata" --network delphi-net --name delphi_web_epidata delphi_web_epidata |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: where is MODULE_NAME
used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its used in the base image that gets built upon in devops/Dockerfile
, "tiangolo/meinheld-gunicorn
". see the documentation for that image, which i also mentioned in the associated issue (#1037) for this pr.
comments noting the purpose of MODULE_NAME
along with that documentation link above should probably be included here, in the Makefile
, and in devops/Dockerfile
.
MODULE_NAME
will also need to be populated in automation or ansible or whatever it is that runs the API server code, which we will probably see when we try to test running this on our staging and/or qa setups. (cc: @korlaxxalrok )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, looks like we'd need to pass an additional environment variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -61,7 +61,7 @@ jobs: | |||
run: | | |||
docker network create --driver bridge delphi-net | |||
docker run --rm -d -p 13306:3306 --network delphi-net --name delphi_database_epidata --cap-add=sys_nice delphi_database_epidata | |||
docker run --rm -d -p 10080:80 --env "SQLALCHEMY_DATABASE_URI=mysql+mysqldb://user:pass@delphi_database_epidata:3306/epidata" --env "FLASK_SECRET=abc" --env "FLASK_PREFIX=/epidata" --network delphi-net --name delphi_web_epidata delphi_web_epidata | |||
docker run --rm -d -p 10080:80 --env "MODULE_NAME=delphi.epidata.server.main" --env "SQLALCHEMY_DATABASE_URI=mysql+mysqldb://user:pass@delphi_database_epidata:3306/epidata" --env "FLASK_SECRET=abc" --env "FLASK_PREFIX=/epidata" --network delphi-net --name delphi_web_epidata delphi_web_epidata |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its used in the base image that gets built upon in devops/Dockerfile
, "tiangolo/meinheld-gunicorn
". see the documentation for that image, which i also mentioned in the associated issue (#1037) for this pr.
comments noting the purpose of MODULE_NAME
along with that documentation link above should probably be included here, in the Makefile
, and in devops/Dockerfile
.
MODULE_NAME
will also need to be populated in automation or ansible or whatever it is that runs the API server code, which we will probably see when we try to test running this on our staging and/or qa setups. (cc: @korlaxxalrok )
This looks good to me. Since this touches both acquisition and the API container image we should coordinate and test fully on staging. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me (pending suggestions + any remaining questions) 👍
5c4c569
to
2b2da06
Compare
@korlaxxalrok @melange396 @krivard applied the changes, re-requesting review! (Also, @korlaxxalrok, let me know how and when you'd like to test this on staging) |
Both changes applied! @melange396 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wonderful!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, looks. We can merge and test on staging next.
Closes #1037.
Prerequisites:
dev
branchdev
Summary
Adds support for the
src/common
directory visible by bothacquisition
&server
and restructures the web Docker container's imports to make them make a little more sense. This includes modifications to the:ci.yaml
workflowdeploy.json
Makefile
Dockerfile
Additionally, this merges the two (identical) logger files from
acquisition
andserver
into one, now located in thecommon
directory.