Building and deploying a Jekyll website on Amazon S3
To build the website of Octoperf, our load testing tool, we use Jekyll. I also use it for this website.
It’s great to generate static content, hosted on Amazon S3 like OctoPerf or on Github for this blog. But we had trouble upgrading jekyll to version 3 on our build server. We use plugin that are not yet available for this version. So we had to revert back to 2.5.
Docker to the rescue
The whole process took us time. So I decided to use Docker to build, optimize and deploy our website. Now all we need is Docker installed on our build server and available in Jenkins, the Continuous Integration tool we use.
I wrote a simple script that:
- Builds the website using jekyll/jekyll docker image,
- Optimizes PNG using docker-optipng image,
- and uploads it to Amazon S3.
|
|
Using Docker, we don’t need to maintain installations of ruby, rvm, gems, jekyll and so on. The build process may take a bit longer, but that’s not a big issue. I even started to use this solution on my laptop, to build the website locally.