I've seen the documentation on how to deploy to AWS S3 but am at a bit of a loss still (I also used this unfinished tutorial.
Do I need to setup an EC2 account? Where do I put the package.json
file? Do only the out
files (and package.json
) need to be uploaded to Amazon? Does all of this go into the bucket MyWebsite.com
?
Note - I'm new to web programming.
As you pointed out my tutorial is unfinished, but I hope it helped a little. Hopefully I can clarify a few things:
You're spot on with
--env static
. You need to add that to everything you do with DocPad so that what you see locally is the same as what you plan to deploy. I.e. you need to useDocPad run --env static
too.My 'tutorial' was on how to point AWS CloudFront at a root domain. This can be a frustrating experience particularly if you're just starting out with static sites. If you're using CloudFront, consider switching to just use S3. You can do this easily by changing the configuration in Route 53.
My tutorial misses an important step; You need to create another bucket with the name of your domain with
www.
in front of it if you would like to use www as well as your root domain. You then configure that bucket as a website and redirect it to the bucket with your website. This is all configuration.You only need to upload everything in the
out
folder.package.json
is not needed once the site has been generated.Check out the source to my site and copy what you need. My whole deployment to S3 is automated through Grunt.
Have fun!