From 49aac2f74d8b0804a32aae068a859e987a212789 Mon Sep 17 00:00:00 2001 From: Aaron Gundel Date: Fri, 18 Oct 2024 15:59:10 -0600 Subject: [PATCH] modify settings prefix --- arches_lingo/settings.py | 4 ++-- .../task-definition-reset-database.json | 24 ++++++++----------- docker/deploy/task-definition.json | 24 ++++++++----------- 3 files changed, 22 insertions(+), 30 deletions(-) diff --git a/arches_lingo/settings.py b/arches_lingo/settings.py index b2b9e952..c4c31615 100644 --- a/arches_lingo/settings.py +++ b/arches_lingo/settings.py @@ -56,7 +56,7 @@ def get_optional_env_variable(var_name, default=None) -> str: RESOURCE_IMPORT_LOG = get_optional_env_variable("ARCHES_RESOURCEIMPORTLOG", os.path.join(APP_ROOT, "logs", "resource_import.log")) ARCHES_LOG_PATH = get_optional_env_variable("ARCHES_LOGPATH", os.path.join(ROOT_DIR, "arches.log")) -STORAGE_BACKEND = get_optional_env_variable("STORAGEBACKEND", "django.core.files.storage.FileSystemStorage") +STORAGE_BACKEND = get_optional_env_variable("ARCHES_STORAGEBACKEND", "django.core.files.storage.FileSystemStorage") if STORAGE_BACKEND == "storages.backends.s3.S3Storage": import psutil @@ -260,7 +260,7 @@ def get_optional_env_variable(var_name, default=None) -> str: app_root=APP_ROOT, ) -ALLOWED_HOSTS = [] +ALLOWED_HOSTS = get_optional_env_variable("ARCHES_ALLOWED_HOSTS", "*").split(',') SYSTEM_SETTINGS_LOCAL_PATH = os.path.join(APP_ROOT, "system_settings", "System_Settings.json") WSGI_APPLICATION = "arches_lingo.wsgi.application" diff --git a/docker/deploy/task-definition-reset-database.json b/docker/deploy/task-definition-reset-database.json index ead40c46..2e0be002 100644 --- a/docker/deploy/task-definition-reset-database.json +++ b/docker/deploy/task-definition-reset-database.json @@ -26,39 +26,35 @@ ], "environment": [ { - "name": "ES_SECRET_ID", + "name": "ARCHES_ES_SECRET_ID", "value": "prod/lingo/elastic" }, { - "name": "DB_SECRET_ID", + "name": "ARCHES_DB_SECRET_ID", "value": "archesDbSecretC996653C-9RvtCl4Ud1ud" }, { - "name": "PUBLIC_SERVER_ADDRESS", + "name": "ARCHES_PUBLIC_SERVER_ADDRESS", "value": "https://lingo.dev.fargeo.com" }, { - "name": "SECRETS_MODE", + "name": "ARCHES_SECRETS_MODE", "value": "AWS" }, { - "name": "S3FILEOVERWRITE", + "name": "ARCHES_S3FILEOVERWRITE", "value": "False" }, { - "name": "ALLOWED_HOSTS", + "name": "ARCHES_ALLOWED_HOSTS", "value": "lingo.dev.fargeo.com" }, { - "name": "TRUSTEDORIGINS", - "value": "https://lingo.dev.fargeo.com" - }, - { - "name": "ESPROTOCOL", + "name": "ARCHES_ESPROTOCOL", "value": "https" }, { - "name": "ESVALIDATE", + "name": "ARCHES_ESVALIDATE", "value": "False" }, { @@ -66,11 +62,11 @@ "value": "arches-lingo" }, { - "name": "STORAGEBACKEND", + "name": "ARCHES_STORAGEBACKEND", "value": "storages.backends.s3.S3Storage" }, { - "name": "S3BUCKETNAME", + "name": "ARCHES_S3BUCKETNAME", "value": "fargeo-lingo-media-files" } ], diff --git a/docker/deploy/task-definition.json b/docker/deploy/task-definition.json index 96cf0ad7..86fa7a4d 100644 --- a/docker/deploy/task-definition.json +++ b/docker/deploy/task-definition.json @@ -17,31 +17,27 @@ ], "environment": [ { - "name": "ES_SECRET_ID", + "name": "ARCHES_ES_SECRET_ID", "value": "prod/lingo/elastic" }, { - "name": "DB_SECRET_ID", + "name": "ARCHES_DB_SECRET_ID", "value": "archesDbSecretC996653C-qRg6QQ5XOMB9" }, { - "name": "PUBLIC_SERVER_ADDRESS", + "name": "ARCHES_PUBLIC_SERVER_ADDRESS", "value": "https://lingo.dev.fargeo.com" }, { - "name": "SECRETS_MODE", + "name": "ARCHES_SECRETS_MODE", "value": "AWS" }, { - "name": "ALLOWED_HOSTS", + "name": "ARCHES_ALLOWED_HOSTS", "value": "lingo.dev.fargeo.com" }, { - "name": "TRUSTEDORIGINS", - "value": "https://lingo.dev.fargeo.com" - }, - { - "name": "ESVALIDATE", + "name": "ARCHES_ESVALIDATE", "value": "False" }, { @@ -49,19 +45,19 @@ "value": "arches-lingo" }, { - "name": "ESPROTOCOL", + "name": "ARCHES_ESPROTOCOL", "value": "https" }, { - "name": "S3FILEOVERWRITE", + "name": "ARCHES_S3FILEOVERWRITE", "value": "False" }, { - "name": "STORAGEBACKEND", + "name": "ARCHES_STORAGEBACKEND", "value": "storages.backends.s3.S3Storage" }, { - "name": "S3BUCKETNAME", + "name": "ARCHES_S3BUCKETNAME", "value": "fargeo-1-lingo-media-files" } ],