wsgi
WSGI Application Entry PointLink
This module serves as the Web Server Gateway Interface (WSGI) entry point for the application, allowing web servers like Gunicorn, uWSGI, or Apache with mod_wsgi to interact with the application.
Key FeaturesLink
- Provides the application instance for WSGI-compatible web servers
- Serves as the deployment entry point in production environments
- Separates server configuration from application logic
- Enables standard deployment practices for Python web applications
Environment VariablesLink
ROMI_DB: Path to the directory containing the FSDB. Default: '/myapp/db' (container)API_PREFIX: Prefix for the REST API URL. Default is empty.PLANTDB_API_SSL: Enable SSL to use an HTTPS scheme. Default isFalse.FLASK_SECRET_KEY: The secret key to use with flask. Default to random (64 bits secret).JWT_SECRET_KEY: The secret key to use with JSON Web Token generator. Default to random (64 bits secret).SESSION_TIMEOUT: Session JWT validity duration in seconds. Default900seconds (15 min).REFRESH_TIMEOUT: Refresh JWT validity duration in seconds. Default86400seconds (1 day).MAX_SESSION: The maximum number of concurrent sessions to allow. Default10.
Usage ExamplesLink
When deploying with uWSGI:
uwsgi --http :5000 --module plantdb.server.cli.wsgi:application --callable application --master