wsgi
plantdb.server.cli.wsgi Link
WSGI Application Entry Point
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 Features
- 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 Variables
ROMI_DB
: Path to the directory containing the FSDB. Default: '/myapp/db' (container)PLANTDB_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 (32 bits secret).JWT_SECRET_KEY
: The secret key to use with JWT token generator. Default to random (32 bits secret).
Usage Examples
When deploying with uWSGI:
.. code-block:: bash
uwsgi --http :5000 --module plantdb.server.cli.wsgi:application --callable application --master
Should then be accessible under: http://localhost:5000/plantdb/scans