diff --git a/backend/djangoindia/settings/production.py b/backend/djangoindia/settings/production.py index 7195dc0f..f49b1c34 100644 --- a/backend/djangoindia/settings/production.py +++ b/backend/djangoindia/settings/production.py @@ -37,8 +37,18 @@ "staticfiles": { "BACKEND": "djangoindia.storage_utils.S3StaticStorage", }, + "dbbackup": { + "BACKEND": "storages.backends.s3boto3.S3Boto3Storage", + "OPTIONS": { + "access_key": os.environ.get("AWS_ACCESS_KEY_ID"), + "secret_key": os.environ.get("AWS_SECRET_ACCESS_KEY"), + "bucket_name": os.environ.get("AWS_BACKUP_STORAGE_BUCKET_NAME"), + "region_name": os.environ.get("AWS_S3_REGION_NAME"), + "default_acl": "private", + "location": os.environ.get("AWS_BACKUP_STORAGE_PATH"), + }, + }, } - REST_FRAMEWORK.update( { "DEFAULT_THROTTLE_CLASSES": [ @@ -50,13 +60,3 @@ } ) -DBBACKUP_STORAGE = "storages.backends.s3boto3.S3Boto3Storage" - -DBBACKUP_STORAGE_OPTIONS = { - "access_key": os.environ.get("AWS_ACCESS_KEY_ID"), - "secret_key": os.environ.get("AWS_SECRET_ACCESS_KEY"), - "bucket_name": os.environ.get("AWS_BACKUP_STORAGE_BUCKET_NAME"), - "region_name": os.environ.get("AWS_S3_REGION_NAME"), - "default_acl": "private", - "location": os.environ.get("AWS_BACKUP_STORAGE_PATH"), -} diff --git a/backend/requirements/base.txt b/backend/requirements/base.txt index 4cfe7f4c..212e6626 100644 --- a/backend/requirements/base.txt +++ b/backend/requirements/base.txt @@ -11,8 +11,8 @@ django-prose-editor==0.9.0 django-prose-editor[sanitize] djangorestframework==3.14.0 # https://github.com/encode/django-rest-framework djangorestframework-simplejwt==5.5.0 -setuptools>=70.0.0 -drf-spectacular + +drf-spectacular==0.27.2 google-api-python-client==2.97.0 google-auth==2.22.0 Pillow==10.4.0 diff --git a/backend/requirements/production.txt b/backend/requirements/production.txt index 4117485b..7269a590 100644 --- a/backend/requirements/production.txt +++ b/backend/requirements/production.txt @@ -2,9 +2,8 @@ -r base.txt boto3==1.28.40 -Collectfast==2.2.0 # https://github.com/antonagestam/collectfast -django-dbbackup==4.2.1 -django-storages==1.14 -django-storages[boto3] -gunicorn==20.1.0 # https://github.com/benoitc/gunicorn +# Collectfast removed due to incompatibility with modern setuptools +django-dbbackup==5.2.0 +django-storages[boto3]==1.14 +gunicorn==23.0.0 # https://github.com/benoitc/gunicorn whitenoise==6.5.0