Skip to content

build: serve with a production WSGI server #116

Closed

Description

@uniqueg

Found in the pre-release review of dev at 98771b3 (before v0.3.0).

Problem

The image (CMD python -m cloud_registry.app), Docker Compose and the Helm chart all run the app with app.run(), i.e. Flask's development server (Werkzeug). It has no worker management, no request or header timeouts and no hardening, and it logs "This is a development server" at every start. There is no production WSGI server in the requirements. (Not a regression: earlier versions did the same.)

Impact

Slow or many concurrent clients can tie up the server's threads and memory under the chart's limits (100m CPU, 128Mi), so probes can fail and the pod restarts.

Proposed fix

  • Split startup into an app factory (with the existing startup checks) and keep python -m cloud_registry.app for development.
  • Add a production WSGI server (e.g. gunicorn) to the requirements and use it in the image's CMD, with worker, thread and timeout settings (configurable in the chart).
  • Check the Compose smoke test and the chart's probes with the new server.

Activity

  1. added a commit that references this issue on Oct 21, 2026
    2438c82
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions