How to create on-demand environments for Jekyll sites

Sreenadh T C
Jul 31, 2019 · 2 min read

“See how your Jekyll site and articles look like before you publish them.”

Want to see how your site will turn out before you publish? Just open a PR on your repo and Dockup will spin up a live site for you!

Assuming that you have a Jekyll blog in place, let’s see how we can dockerise it and create a Dockup Blueprint. Here’s the Jekyll site we’ll use: Minima.

We’ll add a couple of files to the root directory:

  1. Dockerfile to build the docker image of our site.
  2. nginx.conf to serve the static site using Nginx.
Dockerfile and Nginx sample config

Create Blueprint

Now that we have a Dockerfile added to the source, let’s create a Dockup Blueprint.

Make sure you have configured you GitHub account with Dockup. If you haven’t done it yet, you can head over to Dockup Settings

Container for Jekyll

And that’s all! Wasn’t that easy?

Now every time you open a pull request, Dockup will stage that branch and give you a new deployment as shown below:

Deployed successfully

You can follow similar steps to create on-demand environments for other static site generators, say for e.g. Hugo.

Would you like to test it out on your blog? Click here to get started.

Dockup

On-demand environments for engineering teams

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store