-
Notifications
You must be signed in to change notification settings - Fork 30
Dockerize Fastpath #935
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
base: master
Are you sure you want to change the base?
Dockerize Fastpath #935
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❌ Your project check has failed because the head coverage (91.81%) is below the target coverage (95.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## master #935 +/- ##
=======================================
Coverage 91.81% 91.81%
=======================================
Files 61 61
Lines 5179 5179
Branches 339 339
=======================================
Hits 4755 4755
Misses 365 365
Partials 59 59
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…s://github.com/ooni/backend into support-deploying-fastpath-as-docker-container
@@ -0,0 +1,30 @@ | |||
# Stage 1: Building | |||
FROM python:slim AS builder |
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.
I would suggest we be a bit more specific with the image names used for making the docker file.
Let's put in here explicitly 3.13.3-slim-bookworm
in case future versions of python or debian cause issues with running the fastpath.
@@ -21,6 +21,8 @@ def load_config(self): | |||
assert key in self.cfg.settings | |||
self.cfg.set(key, value) | |||
|
|||
self.cfg.set('reload', True) |
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.
It looks like this setting is for development purposes (https://docs.gunicorn.org/en/stable/settings.html#reload). We should not have this on for the production deploy.
dockerfile: Dockerfile | ||
container_name: ooni-fastpath | ||
ports: | ||
- "5000:5000" |
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.
What is listening on port 5000? I tried starting the docker container, but I get connection reset to port 5000, suggesting that perhaps there is no service listening there?
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.
Thanks for working on this!
Left few comments and suggestions. Once solved we can merge.
This PR will add a docker compose configuration able to deploy the Fastpath.
To deploy the docker container you can run:
Note that we still use the
fastpath.conf
file for configuration, but I moved it to the root project dir and the dockerfile expects it to be there. The idea is that we will override this file through Ansible when deploying to EC2Related to ooni/devops#123