Skip to content

Use Gunicorn for container server - #7

Merged
tylerslonecki merged 1 commit into
developmentfrom
feature-MSA
Sep 1, 2026
Merged

Use Gunicorn for container server#7
tylerslonecki merged 1 commit into
developmentfrom
feature-MSA

Conversation

@tylerslonecki

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Gunicorn’s default bind port logic can diverge from the application’s production port defaults when APP_ENV=production and APP_PORT is unset, risking misconfigured container routing.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds Gunicorn as the container’s runtime server configuration so the app runs under a production-grade WSGI process manager instead of python app.py.

Changes:

  • Introduces gunicorn.conf.py with worker/threading, logging, recycling, and optional TLS configuration driven by environment variables.
  • Updates Dockerfile to copy the Gunicorn config and start the container with gunicorn ... app:server.
File summaries
File Description
gunicorn.conf.py New Gunicorn configuration for container runtime (bind/workers/logging/TLS).
Dockerfile Switch container startup from python app.py to gunicorn using the new config.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread gunicorn.conf.py
import os


bind = f"{os.getenv('APP_HOST', '0.0.0.0')}:{os.getenv('APP_PORT', '5000')}"
@tylerslonecki
tylerslonecki merged commit bc8bce5 into development Sep 1, 2026
1 check 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.

2 participants