This repository contains the example code for the 6-hour Varnish training I created.
This is the second iteration of the training course and was first presented at Symfony Live Berlin 2017.
The first iteration was last delivered at VarnishCon 2017 in Amsterdam and can be found in the v1 branch.
The Docker base boxes are as minimal as possible, you won't need a lot of bandwidth to be up-and-running. The Varnish base box is a little bigger than the rest.
If you want to run an example, go through the following steps
- Choose an example.
docker-compose up -dto boot the setup.
- Go to http://localhost/ to run the example.
- Shut the example containers down using the
If you want access to the
varnishlog binary to monitor what's happening run
docker exec -ti sflive-varnish bash to access the bash shell on the container. You can then run
varnishlog including all the extra parameters.
If the example contains 2 Varnish instances, run both commands in a separate shell to access the
varnishlog binary of both Varnish containers:
docker exec -ti sflive-varnish bash docker exec -ti sflive-varnish2 bash
docker-compose setup for each example depends on the following container images:
You can go ahead and pull these boxes using the following commands:
docker pull thijsferyn/nginx:primary docker pull thijsferyn/nginx:secondary docker pull thijsferyn/php:primary docker pull thijsferyn/php:secondary docker pull thijsferyn/varnish:base docker pull thijsferyn/varnish:primary docker pull thijsferyn/varnish:secondary docker pull thijsferyn/haproxy:latest