From 525889ccdd7d752a96811a36fb6a0e3781511c95 Mon Sep 17 00:00:00 2001 From: Anne Haley Date: Thu, 13 Oct 2022 11:26:42 -0400 Subject: [PATCH] Add S3StorageMixin to DockerComposeProductionConfiguration (#616) * Add S3StorageMixin to DockerComposeProductionConfiguration * Use env var names in comment Co-authored-by: Zach Mullen Co-authored-by: Zach Mullen --- miqa/settings.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/miqa/settings.py b/miqa/settings.py index 3581f14c..24c560a5 100644 --- a/miqa/settings.py +++ b/miqa/settings.py @@ -12,6 +12,7 @@ ProductionBaseConfiguration, SmtpEmailMixin, TestingBaseConfiguration, + S3StorageMixin, ) from composed_configuration._configuration import _BaseConfiguration from configurations import values @@ -107,12 +108,19 @@ class DockerComposeProductionConfiguration( MiqaMixin, SmtpEmailMixin, HttpsMixin, + S3StorageMixin, _BaseConfiguration, ): """For the production deployment using docker-compose.""" MIQA_URL_PREFIX = values.Value(environ=True, default='/') + # Configure connection to S3 bucket by setting the following environment variables: + # AWS_DEFAULT_REGION + # AWS_ACCESS_KEY_ID + # AWS_SECRET_ACCESS_KEY + # DJANGO_STORAGE_BUCKET_NAME + # Needed to support the reverse proxy configuration USE_X_FORWARDED_HOST = True