{"id":18400468,"url":"https://github.com/docksal/service-varnish","last_synced_at":"2025-04-07T06:33:27.193Z","repository":{"id":13840425,"uuid":"69391652","full_name":"docksal/service-varnish","owner":"docksal","description":"Varnish Docker image for Docksal","archived":false,"fork":false,"pushed_at":"2022-03-28T16:46:37.000Z","size":77,"stargazers_count":2,"open_issues_count":0,"forks_count":12,"subscribers_count":4,"default_branch":"develop","last_synced_at":"2024-04-22T11:30:59.744Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/docksal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-27T19:33:51.000Z","updated_at":"2022-09-28T22:22:07.000Z","dependencies_parsed_at":"2022-08-07T07:15:48.276Z","dependency_job_id":null,"html_url":"https://github.com/docksal/service-varnish","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docksal%2Fservice-varnish","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docksal%2Fservice-varnish/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docksal%2Fservice-varnish/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docksal%2Fservice-varnish/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/docksal","download_url":"https://codeload.github.com/docksal/service-varnish/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247208416,"owners_count":20901570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T02:33:39.179Z","updated_at":"2025-04-07T06:33:27.151Z","avatar_url":"https://github.com/docksal.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Varnish Docker images for Docksal\n\nVarnish is an HTTP accelerator designed for content-heavy dynamic web sites as well as APIs.\n\nThis image(s) is part of the [Docksal](http://docksal.io) image library.\n\n\n## Versions\n\n- `docksal/varnish:4.1` (`docksal/varnish:4.1-2.0`)\n- `docksal/varnish:6.0` (`docksal/varnish:6.0-2.0`)\n- `docksal/varnish:6.1` (`docksal/varnish:6.1-2.0`, `docksal/varnish:latest`)\n\nImage tag scheme: `\u003csoftware-version\u003e[-\u003cimage-stability-tag\u003e][-\u003cflavor\u003e]`\n\n\n## Features\n\n- Cache flushing using `PURGE` (individual pages) and `BAN` (cache tag based) requests\n- VCL config settings via environment variables, as well as custom VCL config support\n- BigPipe support \n\n\n## Environmental variables\n\n- `VARNISH_PORT` - port Varnish binds to, default: `80`\n- `VARNISH_BACKEND_HOST` - backed-end IP/host, default: `web`\n- `VARNISH_BACKEND_PORT` - backed-end port, default: `80`\n- `VARNISH_CACHE_SIZE` - cache size, default: `64M`\n- `VARNISH_VARNISHD_PARAMS` - extra parameters for `varnishd`.\n- `VARNISH_VARNISHNCSA_PARAMS` - parameters for `varnishncsa` (logging).\n- `VARNISH_SECRET` - allow the secret to be set for varnish.\n- `VARNISH_CACHE_TAGS_HEADER` - Varnish cache header name for BAN's, default: `Cache-Tags`\n\n\n## Cache flushing\n\n### PURGE\n\nCache for a specific URL can be flushed using the `PURGE` HTTP method, example:\n\n```\ncurl -X PURGE http://varnish.tests.docksal/node/1\n```\n\n### BAN\n\nCache for a group of URLs can be flushed using the `BAN` HTTP method by passing a list of tags via a specific header.\n\nThe application has to provide the cache tags header value(s) in the response (e.g. `Cache-Tags: node:1 term:2`).\nThese tags are then used to ban pages from Varnish cache (usually handled by the application using a module/library).\n\nBy default, `Cache-Tags` is used as the header to pass cache tags.\nThe header name can be overridden via the `VARNISH_CACHE_TAGS_HEADER` environment variable.\n\nDepending your application environment `VARNISH_CACHE_TAGS_HEADER` may need to be set to:\n\n- `Purge-Cache-Tags` for use with Drupal's [Purge module](https://www.drupal.org/project/purge)\n- `X-Acquia-Purge-Tags` for use with Drupal's [Acquia Purge module](https://www.drupal.org/project/acquia_purge)\n- `X-Cache-Tags` for [Symfony FOSHttpCache](https://foshttpcache.readthedocs.io/en/stable/response-tagging.html#tags)\n\nUsing `BAN` to manually flush cache by tag:\n\n```\ncurl -X BAN http://varnish.tests.docksal/ -H \"Cache-Tags: node:1\"\n```\n\n\n## VCL\n\nTo provide a custom VCL config mount it at `/opt/default.vcl`.\n\nWhen used with Docksal, custom VCL is automatically loaded from `.docksal/etc/varnish/default.vcl` if one exists \nin the project codebase.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdocksal%2Fservice-varnish","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdocksal%2Fservice-varnish","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdocksal%2Fservice-varnish/lists"}