Skip to content
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

Update presidio containers to use gunicorn #1497

Merged
merged 7 commits into from
Dec 14, 2024

Conversation

RKapadia01
Copy link
Contributor

Change Description

  • Modified the main application entry points in presidio-analyzer/app.py, presidio-anonymizer/app.py, and presidio-image-redactor/app.py to use the app instance directly instead of creating a new Server instance when running the application.
  • Added PORT and WORKERS environment variables to the Dockerfiles for all 3 services, to allow configuration of the server port and number of worker processes.
  • Updated the command from Flaks to Gunicorn in the Dockerfiles

Issue reference

This PR fixes issue #1496

Checklist

  • I have reviewed the contribution guidelines
  • I have signed the CLA (if required)
  • My code includes unit tests
  • All unit tests and lint checks pass locally
  • My PR contains documentation updates / additions if required

@omri374
Copy link
Contributor

omri374 commented Dec 12, 2024

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

SharonHart
SharonHart previously approved these changes Dec 12, 2024
Copy link
Contributor

@SharonHart SharonHart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

Copy link
Contributor

@omri374 omri374 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks :) I've added two minor points

presidio-analyzer/Dockerfile Show resolved Hide resolved
presidio-analyzer/pyproject.toml Show resolved Hide resolved
presidio-analyzer/app.py Outdated Show resolved Hide resolved
@omri374
Copy link
Contributor

omri374 commented Dec 13, 2024

/azp run

@omri374
Copy link
Contributor

omri374 commented Dec 13, 2024

Thanks! Looks great

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

omri374
omri374 previously approved these changes Dec 13, 2024
@omri374
Copy link
Contributor

omri374 commented Dec 14, 2024

Added noqa to ignore linting in this case

@omri374
Copy link
Contributor

omri374 commented Dec 14, 2024

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@omri374 omri374 merged commit a081c22 into microsoft:main Dec 14, 2024
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants