mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 10:53:28 -05:00
config buckets
This commit is contained in:
2
Makefile
2
Makefile
@@ -125,7 +125,7 @@ generate-manifest:
|
||||
|
||||
.PHONY: upload-static ## Upload the static files to be served from S3
|
||||
upload-static:
|
||||
aws s3 cp --region eu-west-1 --recursive --cache-control max-age=315360000,immutable ./app/static s3://${DNS_NAME}-static
|
||||
aws s3 cp --region us-west-2 --recursive --cache-control max-age=315360000,immutable ./app/static s3://${DNS_NAME}-static
|
||||
|
||||
.PHONY: cf-deploy
|
||||
cf-deploy: ## Deploys the app to Cloud Foundry
|
||||
|
||||
@@ -31,7 +31,7 @@ class Config(object):
|
||||
ANTIVIRUS_API_KEY = os.environ.get('ANTIVIRUS_API_KEY')
|
||||
|
||||
ASSETS_DEBUG = False
|
||||
AWS_REGION = 'eu-west-1'
|
||||
AWS_REGION = 'us-west-2'
|
||||
DEFAULT_SERVICE_LIMIT = 50
|
||||
|
||||
EMAIL_EXPIRY_SECONDS = 3600 # 1 hour
|
||||
@@ -97,8 +97,8 @@ class Development(Config):
|
||||
DEBUG = True
|
||||
SESSION_COOKIE_SECURE = False
|
||||
SESSION_PROTECTION = None
|
||||
CSV_UPLOAD_BUCKET_NAME = 'development-notifications-csv-upload'
|
||||
CONTACT_LIST_UPLOAD_BUCKET_NAME = 'development-contact-list'
|
||||
CSV_UPLOAD_BUCKET_NAME = 'local-notifications-csv-upload'
|
||||
CONTACT_LIST_UPLOAD_BUCKET_NAME = 'local-contact-list'
|
||||
LOGO_UPLOAD_BUCKET_NAME = 'public-logos-tools'
|
||||
LOGO_CDN_DOMAIN = 'static-logos.notify.tools'
|
||||
MOU_BUCKET_NAME = 'notify.tools-mou'
|
||||
|
||||
@@ -61,7 +61,7 @@ function start_application {
|
||||
}
|
||||
|
||||
function start_aws_logs_agent {
|
||||
exec aws logs push --region eu-west-1 --config-file /home/vcap/app/awslogs.conf &
|
||||
exec aws logs push --region us-west-2 --config-file /home/vcap/app/awslogs.conf &
|
||||
AWSLOGS_AGENT_PID=$!
|
||||
echo "AWS logs agent pid: ${AWSLOGS_AGENT_PID}"
|
||||
}
|
||||
|
||||
@@ -107,13 +107,13 @@ def test_get_letter_s3_object_raises_custom_error(
|
||||
expected_exception
|
||||
):
|
||||
bucket_name = current_app.config['TRANSIENT_UPLOADED_LETTERS']
|
||||
s3 = boto3.client('s3', region_name='eu-west-1')
|
||||
s3 = boto3.client('s3', region_name='us-west-2')
|
||||
|
||||
# bucket not existing will trigger some other error
|
||||
if will_raise_custom_error:
|
||||
s3.create_bucket(
|
||||
Bucket=bucket_name,
|
||||
CreateBucketConfiguration={'LocationConstraint': 'eu-west-1'}
|
||||
CreateBucketConfiguration={'LocationConstraint': 'us-west-2'}
|
||||
)
|
||||
|
||||
with pytest.raises(expected_exception):
|
||||
|
||||
@@ -24,7 +24,7 @@ data = {'data': 'some_data'}
|
||||
filename = 'test.png'
|
||||
svg_filename = 'test.svg'
|
||||
upload_id = 'test_uuid'
|
||||
region = 'eu-west1'
|
||||
region = 'us-west-2'
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
||||
Reference in New Issue
Block a user