Skip to content

Update presidio containers to use gunicorn#1497

Merged
omri374 merged 7 commits into
microsoft:mainfrom
RKapadia01:feat/presidio-gunicorn
Dec 14, 2024
Merged

Update presidio containers to use gunicorn#1497
omri374 merged 7 commits into
microsoft:mainfrom
RKapadia01:feat/presidio-gunicorn

Conversation

@RKapadia01

Copy link
Copy Markdown
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

omri374 commented Dec 12, 2024

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

SharonHart
SharonHart previously approved these changes Dec 12, 2024

@SharonHart SharonHart left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks great, thanks!

@omri374 omri374 left a comment

Copy link
Copy Markdown
Collaborator

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

Comment thread presidio-analyzer/Dockerfile
Comment thread presidio-analyzer/pyproject.toml
Comment thread presidio-analyzer/app.py Outdated
@omri374

omri374 commented Dec 13, 2024

Copy link
Copy Markdown
Collaborator

/azp run

@omri374

omri374 commented Dec 13, 2024

Copy link
Copy Markdown
Collaborator

Thanks! Looks great

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

omri374
omri374 previously approved these changes Dec 13, 2024
@omri374

omri374 commented Dec 14, 2024

Copy link
Copy Markdown
Collaborator

Added noqa to ignore linting in this case

@omri374

omri374 commented Dec 14, 2024

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@omri374 omri374 merged commit a081c22 into microsoft:main Dec 14, 2024
@RKapadia01 RKapadia01 deleted the feat/presidio-gunicorn branch April 29, 2025 05:40
prokopidis pushed a commit to prokopidis/presidio that referenced this pull request Jun 23, 2026
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