Skip to content

Latest commit

 

History

History
53 lines (42 loc) · 1.12 KB

README.md

File metadata and controls

53 lines (42 loc) · 1.12 KB

My cruising blog (svcrazylove.com) is a static website hosted in an s3 bucket with CloudFront acting as CDN and https termination point.

Install & Configure

cd ~/Documents
git clone [email protected]:davidkrisch/svcrazylove.com.git
cd svcrazylove.com
pip install virtualenv
virtualenv env
source ./env/bin/activate
pip install -r requirements.txt
# Install s3cmd and set up keys
brew install s3cmd
s3cmd --configure  # Retrieve credientials from AWS console
# So we can invalidate the CloudFront cache...
brew install awscli

Generate html

cd ~/Documents/svcrazylove.com
benjen

Generate images

cd ~/Documents/website-images
cp ../svcrazylove.com/small.py .
python small.py

Deploy to S3

cd ~/Documents/svcrazylove.com/output
s3cmd sync . s3://svcrazylove.com

Clear CloudFront cache

The site uses AWS CloudFront for https and CDN. When the site is updated we have to manually clear the CloudFront cache or wait until the TTL expires. That could be as much as a day, so I've added another step to the deploy process.

./create_invalidation.sh