Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Matthias Noback:
Containerizing a static website with Docker (Part 1 & 2)
Jan 06, 2017 @ 15:07:39

Matthias Noback has started a series to his site showing you how to use Docker along with a static site, like one generated with Sculpin to create a complete environment. So far he's posted part one and part two.

Recently a former colleague of mine, Lucas van Lierop, showed me his new website, which he created using Spress. Lucas took two bold moves: he started freelancing, and he open-sourced his website code. This to me was very inspiring. I've been getting up to speed with Docker recently and am planning to do a lot more with it over the coming months, and being able to take a look at the source code of up-to-date projects that use Docker is certainly invaluable.

Taking lots of inspiration from Lucas's codebase, and after several hours of fiddling with configuration files, I can now guide you through the steps it took to containerize my blog (which is the site you're visiting now) and deploy a single container to a production server.

In part one he talks about how his blog is currently set up - based on a "large set of Markdown files" - and using Sculpin to generate the resulting site. He walks through the configuration of the Sculpin installation and how to configure and build the initial container, the "build" container.

In part two he continues the process but creates a "blog" container this time. This container runs the web server itself (nginx) configured as required by the Sculpin formatting.

tagged: container docker static website tutorial series part1 part2

Link: http://php-and-symfony.matthiasnoback.nl/categories/Docker/


Trending Topics: