use cloudfront instead of flask to serve static images

branding in emails was previously hosted from admin app - this changes
the url to be static.{domain}/images instead of {domain}/static/images,
which redirects to cloudfront.

some manipulation of the URL was required to make sure it still serves
locally rather than returning "static.localhost:6012" for example.

(if ADMIN_BASE_URL is localhost it just returns the old /static/
path)

also was able to remove DB interaction from a test. woo!
This commit is contained in:
Leo Hemsted
2016-12-21 16:15:18 +00:00
parent 6bf024569a
commit 5cbe4eb5b2
4 changed files with 67 additions and 12 deletions

View File

@@ -20,8 +20,8 @@ statsd==3.2.1
jsonschema==2.5.1
Flask-Redis==0.1.0
git+https://github.com/alphagov/notifications-python-client.git@3.0.0#egg=notifications-python-client==3.0.0
notifications-python-client==3.0.0
git+https://github.com/alphagov/notifications-utils.git@12.1.1#egg=notifications-utils==12.1.1
git+https://github.com/alphagov/notifications-utils.git@12.2.0#egg=notifications-utils==12.2.0
git+https://github.com/alphagov/boto.git@2.43.0-patch3#egg=boto==2.43.0-patch3