From e4793f06e87dd179b442fc0b7a4965b371c958d6 Mon Sep 17 00:00:00 2001 From: jo Date: Sat, 8 Apr 2023 18:31:55 +0200 Subject: [PATCH] refactor: use global IS_DOCKER_SETUP setting --- api/config/settings/common.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/config/settings/common.py b/api/config/settings/common.py index 518f85bf8..45c08b827 100644 --- a/api/config/settings/common.py +++ b/api/config/settings/common.py @@ -14,6 +14,7 @@ APPS_DIR = ROOT_DIR.path("funkwhale_api") env = environ.Env() ENV = env LOGLEVEL = env("LOGLEVEL", default="info").upper() +IS_DOCKER_SETUP = env.bool("IS_DOCKER_SETUP", False) if env("FUNKWHALE_SENTRY_DSN", default=None) is not None: @@ -374,7 +375,7 @@ vars().update(EMAIL_CONFIG) # The `_database_url_docker` variable will only by used as default for DATABASE_URL # in the context of a docker deployment. _database_url_docker = None -if env.bool("IS_DOCKER_SETUP", False) and env.str("DATABASE_URL", None) is None: +if IS_DOCKER_SETUP and env.str("DATABASE_URL", None) is None: warnings.warn( DeprecationWarning( "the automatically generated 'DATABASE_URL' configuration in the docker "