You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Funnel provides multiple apps from a single module. These apps end up sharing configuration that is explicitly meant for a single app. Currently, a special config file hasgeekapp.py is used to isolate config for the main app, but this is a kludge.
We're migrating to config from environment variables. Since a worker (uwsgi) will be bound to only a specific app (currently app or shortlinkapp), it can supply app-specific config in the env and simply ignore the misconfiguration of other apps. However, this doesn't work for development where the apps are multiplexed via a single host app in funnel.devtest:AppByHostWsgi. They will again share a single configuration. Also, the app_url_for helper consults the config of unused apps, so misconfiguration is a problem there.
We can overcome this by using app-specific env prefixes. Flask defaults to FLASK_ prefix, which we can keep for common config, and then apply a second round of config using FLASK_{app_name}_ prefix. This feature needs to be exposed via Coaster's coaster.app.init_app.
The text was updated successfully, but these errors were encountered:
jace
added a commit
to hasgeek/coaster
that referenced
this issue
May 29, 2023
Funnel provides multiple apps from a single module. These apps end up sharing configuration that is explicitly meant for a single app. Currently, a special config file
hasgeekapp.py
is used to isolate config for the main app, but this is a kludge.We're migrating to config from environment variables. Since a worker (uwsgi) will be bound to only a specific app (currently
app
orshortlinkapp
), it can supply app-specific config in the env and simply ignore the misconfiguration of other apps. However, this doesn't work for development where the apps are multiplexed via a single host app infunnel.devtest:AppByHostWsgi
. They will again share a single configuration. Also, theapp_url_for
helper consults the config of unused apps, so misconfiguration is a problem there.We can overcome this by using app-specific env prefixes. Flask defaults to
FLASK_
prefix, which we can keep for common config, and then apply a second round of config usingFLASK_{app_name}_
prefix. This feature needs to be exposed via Coaster'scoaster.app.init_app
.The text was updated successfully, but these errors were encountered: