Skip to content
This repository has been archived by the owner on Aug 8, 2018. It is now read-only.

wodby/drupal-varnish

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Varnish for Drupal Docker Container Image

Build Status Docker Pulls Docker Stars Docker Layers

Docker Images

❗For better reliability we release images with stability tags (wodby/drupal-varnish:4-X.X.X) which correspond to git tags. We strongly recommend using images only with stability tags.

Overview:

Supported tags and respective Dockerfile links:

Environment Variables

See more at wodby/varnish

Variable Default Value Description
VARNISH_ALLOW_UNRESTRICTED_BAN
VARNISH_ALLOW_UNRESTRICTED_PURGE
VARNISH_BACKEND_BETWEEN_BYTES_TIMEOUT 2s
VARNISH_BACKEND_CONNECT_TIMEOUT 5s
VARNISH_BACKEND_FIRST_BYTE_TIMEOUT 300s
VARNISH_CACHE_STATIC_FILES
VARNISH_ERRORS_TTL 10m
VARNISH_GRACE 6h
VARNISH_SECONDARY_STORAGE_CONDITION Must be valid vcl

VARNISH_EXCLUDE_URLS

Backslashes must be escaped \\

^(/update\\.php|/([a-z]{2}/)?admin|/([a-z]{2}/)?admin/.*|/([a-z]{2}/)?system/files/.*|/([a-z]{2}/)?flag/.*|.*/ajax/.*|.*/ahah/.*)$

VARNISH_STATIC_FILES

pdf|asc|dat|txt|doc|xls|ppt|tgz|csv|png|gif|jpeg|jpg|ico|swf|css|js|svg

VARNISH_PRESERVED_COOKIES

SESS[a-z0-9]+|SSESS[a-z0-9]+|NO_CACHE

VARNISH_SECONDARY_STORAGE_CONDITION

Allows defining custom conditions for storing the cache object in the secondary storage; as it is injected into an if it has to contain valid VCL syntax for it.

Please note that VARNISHD_SECONDARY_STORAGE (from the base image) must be defined as well, otherwise the secondary storage would not be available.

Example: instruct varnish to store in the secondary storage from the backend via custom header X-Cache-Bin:

VARNISH_STORAGE_CONDITION='beresp.http.x-cache-bin = "secondary"'

Orchestration actions

See wodby/varnish for all actions.

Complete Drupal stack

See Docker4Drupal