Hacker News new | ask | show | jobs
by whalesalad 2579 days ago
I have a two-line Makefile that with one target that sync's my website with an S3 bucket. Deploys are instant. The rest is handled by Cloudflare an AWS. The sheer number of moving parts in this system is outrageous for a static website. A fun project for sure, though.
1 comments

I think the complexity for this setup is about the same. Once the different AWS services are provisioned during the initial setup, subsequent deploys are quite straightforward. For example, I have a three-line Makefile target for Jekyll sites that looks something like this (using Docker with a local `aws-cli` image wrapping the CLI):

    docker run --rm -e "JEKYLL_ENV=production" -v $(PWD)/src:/srv/jekyll -it jekyll/jekyll:3.8.5 jekyll build
    docker run --rm -itv $(HOME)/.aws:/root/.aws aws-cli aws s3 sync src/_site s3://www.<mydomain>
    docker run --rm -itv $(HOME)/.aws:/root/.aws aws-cli aws cloudfront create-invalidation --distribution-id <mydistribution> --paths "/*"