This is the code for the Gruntwork website.
Gruntwork can help you get your entire infrastructure, defined as code, in about a day. You focus on your product. We'll take care of the Gruntwork.
The fastest way to launch this site is to use Docker.
git clone
this repodocker compose up
- Go to
http://localhost:4000
to test - If you are going to be testing the checkout flow, you must login to Aperture at: https://aperture.dogfood-stage.com/.
The default Docker compose configuration supports hot-reloading of your local environment, meaning that as you edit files to change markup, text, images, etc, your local development server will pick up these changes and reload the latest version of the site for you. This makes it quick and convenient to develop on the site locally.
git clone
this repo- Install Jekyll
- Just the first time:
bundle install
- Start Jekyll server:
bundle exec jekyll serve --livereload
- Go to
http://localhost:4000
- If you are going to be testing the checkout flow, you must login to Aperture at: https://aperture.dogfood-stage.com/.
To deploy the site:
- Create a PR with your code changes
- After the PR has been approved, merge it into
master
- Create a new tag, you can do this manually via git or in the subsequent step on the releases page - be sure to increment the version number using semantic versioning
- Go to the releases page and create a draft release with the relevant information (use the "Generate Release Notes" button to make your life easier)
- Release it
- The CI/CD pipeline will deploy it automatically
- Built with Jekyll. This website is completely static and we use basic HTML or Markdown for everything.
- Preview environments are built with Netlify.
- Hosted on Amazon S3, with CloudFront as a CDN. Using s3_website to automatically upload static content to S3.
- We use Bootstrap and Less.
- We're using UptimeRobot, Google Analytics, and HubSpot Traffic Analytics for monitoring and metrics.
The Gruntwork website uses a Ruby Gem called Jekyll Feed
which generates a structured RSS feed of "posts" on the site. Unfortunately, in development this can significantly slow down the hot-reloading of the site, forcing you to wait upwards of a minute at a time to see minor text changes locally.
You'll know this is happening when you look at the STDOUT
of your docker-compose
process and the final count of seconds spent Generating feed for posts
is greater than 5:
web_1 | Regenerating: 1 file(s) changed at 2021-07-21 14:31:08
web_1 | _data/website-terms.yml
web_1 | Jekyll Feed: Generating feed for posts
web_1 | ...done in 58.507850014 seconds.
As a temporary workaround, you can open the Gemfile in the root of the project directory and temporarily comment out the line that pulls in the Jekyll Feed dependency:
source 'https://rubygems.org'
gem 'jekyll', '~> 4.1'
gem 's3_website', '3.3.0'
group :jekyll_plugins do
gem 'jekyll-redirect-from', '0.16.0'
gem 'jekyll-sitemap', '1.4.0'
gem 'jekyll-paginate', '1.1.0'
gem 'therubyracer', '0.12.3'
gem 'less', '2.6.0'
gem 'jekyll-asciidoc'
gem 'jekyll-toc'
gem 'nokogiri', '1.11.0.rc4' # Addressing security issue in earlier versions of this library
# gem 'jekyll-feed'
end
Important - Be sure that you don't end up committing this change because we do want the Jekyll Feed plugin to run for production!
This can happen especially if you add or remove files from the website's working directory. When this occurs, terminate your docker-compose
process and restart it to see your changes reflected.
See LICENSE.txt.