---
title: Charmhub | Deploy Flask using Charmhub - The Open Operator Collection
description: Deploy the latest version of Flask as a Kubernetes Operator on any cloud.
url: https://charmhub.io/flask-k8s/configurations
---

# Flask

[Canonical IS DevOps](https://charmhub.io/publisher/canonical-is-devops "View all packages from Canonical IS DevOps")

* [Canonical IS DevOps](https://charmhub.io/publisher/canonical-is-devops "View all packages from Canonical IS DevOps")

Platform:

edge 19

```
juju deploy flask-k8s --channel edge
```

[Learn to deploy on juju >](https://juju.is/docs/juju/manage-applications)

* [database\_migration\_script](https://charmhub.io/flask-k8s/configurations#database_migration_script)
* [flask\_application\_root](https://charmhub.io/flask-k8s/configurations#flask_application_root)
* [flask\_debug](https://charmhub.io/flask-k8s/configurations#flask_debug)
* [flask\_env](https://charmhub.io/flask-k8s/configurations#flask_env)
* [flask\_permanent\_session\_lifetime](https://charmhub.io/flask-k8s/configurations#flask_permanent_session_lifetime)
* [flask\_preferred\_url\_scheme](https://charmhub.io/flask-k8s/configurations#flask_preferred_url_scheme)
* [flask\_secret\_key](https://charmhub.io/flask-k8s/configurations#flask_secret_key)
* [flask\_session\_cookie\_secure](https://charmhub.io/flask-k8s/configurations#flask_session_cookie_secure)
* [webserver\_keepalive](https://charmhub.io/flask-k8s/configurations#webserver_keepalive)
* [webserver\_threads](https://charmhub.io/flask-k8s/configurations#webserver_threads)
* [webserver\_timeout](https://charmhub.io/flask-k8s/configurations#webserver_timeout)
* [webserver\_workers](https://charmhub.io/flask-k8s/configurations#webserver_workers)
* [webserver\_wsgi\_path](https://charmhub.io/flask-k8s/configurations#webserver_wsgi_path)

[Learn about configurations >](https://juju.is/docs/juju/configuration#heading--application-configuration)

* 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.
* flask\_session\_cookie\_secure | boolean

  Set the secure attribute in the Flask application cookies. This configuration will set the FLASK\_SESSION\_COOKIE\_SECURE 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".
