Flask

  • By Canonical IS DevOps
Channel Revision Published Runs on
latest/edge 19 04 Jan 2024
Ubuntu 22.04
juju deploy flask-k8s --channel edge
Show information

Platform:

Learn about configurations >

  • database_migration_script | string

    Specifies the relative path from /flask/app that points to a shell script executing database migrations for the Flask application. This script is designed to run once for each Flask container unit. However, users must ensure: 1. The script can be executed multiple times without issues; 2. Concurrent migrations from different units are safe. In case of migration failure, the charm will re-attempt during the update-status event. Successful database migration in a container ensures that any configuration updates won't trigger another migration unless the Flask container is upgraded or restarted.

  • flask_application_root | string

    Path in which the application / web server is mounted. This configuration will set the FLASK_APPLICATION_ROOT environment variable. Run `app.config.from_prefixed_env()` in your Flask application in order to receive this configuration.

  • flask_debug | boolean

    Whether Flask debug mode is enabled.

  • flask_env | string

    What environment the Flask app is running in, by default it's 'production'.

  • flask_permanent_session_lifetime | int

    Time in seconds for the cookie to expire in the Flask application permanent sessions. This configuration will set the FLASK_PERMANENT_SESSION_LIFETIME environment variable. Run `app.config.from_prefixed_env()` in your Flask application in order to receive this configuration.

  • flask_preferred_url_scheme | string

    Default: HTTPS

    Scheme for generating external URLs when not in a request context in the Flask application. By default, it's "HTTPS". This configuration will set the FLASK_PREFERRED_URL_SCHEME environment variable. Run `app.config.from_prefixed_env()` in your Flask application in order to receive this configuration.

  • flask_secret_key | string

    The secret key used for securely signing the session cookie and for any other security related needs by your Flask application. This configuration will set the FLASK_SECRET_KEY environment variable. Run `app.config.from_prefixed_env()` in your Flask application in order to receive this configuration.

  • webserver_keepalive | int

    Time in seconds for webserver to wait for requests on a Keep-Alive connection.

  • webserver_threads | int

    Run each webserver worker with the specified number of threads.

  • webserver_timeout | int

    Time in seconds to kill and restart silent webserver workers.

  • webserver_workers | int

    The number of webserver worker processes for handling requests.

  • webserver_wsgi_path | string

    Default: app:app

    The WSGI application path. By default, it's set to "app:app".