-
Notifications
You must be signed in to change notification settings - Fork 3.7k
fix(pii): listen on 5001 to avoid app :3000 collision (awsvpc) #5182
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -38,11 +38,13 @@ RUN groupadd -g 1001 pii && \ | |||||
| chown -R pii:pii /app | ||||||
| USER pii | ||||||
|
|
||||||
| EXPOSE 3000 | ||||||
| # Listen on 5001. In the ECS task all containers share one network namespace | ||||||
| # (awsvpc) and the app owns 3000, so this sidecar must not use 3000. | ||||||
| EXPOSE 5001 | ||||||
|
|
||||||
| # start-period is generous: five large spaCy models load at import before | ||||||
| # /health responds. Tune against measured cold-start once built. | ||||||
| HEALTHCHECK --interval=30s --timeout=5s --start-period=180s --retries=3 \ | ||||||
| CMD curl -fsS http://localhost:3000/health || exit 1 | ||||||
| CMD curl -fsS http://localhost:5001/health || exit 1 | ||||||
|
|
||||||
| CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "3000"] | ||||||
| CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "5001"] | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The PR description says "bind
Suggested change
|
||||||
Uh oh!
There was an error while loading. Please reload this page.