Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove leftovers of AWS setup #891

Merged
merged 2 commits into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .env.base
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ DJANGO_EMAIL_USE_TLS=true
DJANGO_MANAGERS=name1 <email1>, name2 <email2>
DJANGO_SECURE=false
DJANGO_USE_GOOGLE_STORAGE=false
DJANGO_USE_AWS_STORAGE=false
GENERAL_EMAIL_RECEPIENTS=name1 <email1>, name2 <email2>
PRESS_EMAIL_RECEPIENTS=name1 <email1>, name2 <email2>
SERVICE_EMAIL_RECEPIENTS=name1 <email1>, name2 <email2>
Expand Down
28 changes: 0 additions & 28 deletions foundation/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,6 @@ def _parse_email_list(varname):
os.path.join(BASE_DIR, 'static'),
)

AWS_S3_CUSTOM_DOMAIN = env.get('DJANGO_AWS_S3_CUSTOM_DOMAIN')

CUSTOM_ASSETS_DOMAIN = env.get('DJANGO_CUSTOM_ASSETS_DOMAIN')

STATIC_URL = '/assets/'
Expand All @@ -346,28 +344,6 @@ def _parse_email_list(varname):
GS_QUERYSTRING_AUTH = False
GS_DEFAULT_ACL = "publicRead"
# We use local static files, not use STATICFILES_STORAGE = "storages.backends.gcloud.GoogleCloudStorage"
elif env.get('DJANGO_USE_AWS_STORAGE') == 'true':
AWS_ACCESS_KEY_ID = env['AWS_ACCESS_KEY_ID']
AWS_SECRET_ACCESS_KEY = env['AWS_SECRET_ACCESS_KEY']
AWS_STORAGE_BUCKET_NAME = env['AWS_STORAGE_BUCKET_NAME']
AWS_QUERYSTRING_AUTH = False
AWS_HEADERS = {
'Cache-Control': 'max-age=86400',
}
AWS_DEFAULT_ACL = 'public-read'

# django-s3-folder-storage is no longer maintained
# INSTALLED_APPS += ('s3_folder_storage',)
DEFAULT_FILE_STORAGE = 's3_folder_storage.s3.DefaultStorage'
THUMBNAIL_DEFAULT_STORAGE = 's3_folder_storage.s3.DefaultStorage'
DEFAULT_S3_PATH = 'media'
MEDIA_ROOT = 'media/'

if AWS_S3_CUSTOM_DOMAIN:
MEDIA_URL = '//%s/%s/' % (AWS_S3_CUSTOM_DOMAIN, DEFAULT_S3_PATH)
else:
MEDIA_URL = '//s3.amazonaws.com/%s/%s/' % (AWS_STORAGE_BUCKET_NAME,
DEFAULT_S3_PATH)
else:
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
Expand Down Expand Up @@ -408,10 +384,6 @@ def _parse_email_list(varname):

# Content Security Policy
asset_hosts = ['https://storage.googleapis.com']
if AWS_S3_CUSTOM_DOMAIN:
asset_hosts.append('https://%s' % AWS_S3_CUSTOM_DOMAIN)
else:
asset_hosts.append('https://s3.amazonaws.com')
if CUSTOM_ASSETS_DOMAIN:
asset_hosts.append('https://%s' % CUSTOM_ASSETS_DOMAIN)

Expand Down
53 changes: 0 additions & 53 deletions scripts/sync-db.sh

This file was deleted.