{"id":20329352,"url":"https://github.com/ddev/ddev-varnish","last_synced_at":"2025-04-11T20:41:39.476Z","repository":{"id":37790439,"uuid":"475027974","full_name":"ddev/ddev-varnish","owner":"ddev","description":"Varnish reverse proxy add-on for DDEV","archived":false,"fork":false,"pushed_at":"2025-04-10T19:31:42.000Z","size":127,"stargazers_count":9,"open_issues_count":2,"forks_count":10,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-10T20:42:38.709Z","etag":null,"topics":["ddev-get"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ddev.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["ddev"],"custom":["https://www.paypal.com/donate/?hosted_button_id=MCNCSZHC7LHSQ","https://ddev.com/support-ddev/"]}},"created_at":"2022-03-28T14:01:30.000Z","updated_at":"2025-04-10T19:31:44.000Z","dependencies_parsed_at":"2023-02-14T12:31:47.324Z","dependency_job_id":"6aa6a191-59e0-4c72-86cb-d6e11742db9c","html_url":"https://github.com/ddev/ddev-varnish","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":"ddev/ddev-addon-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddev%2Fddev-varnish","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddev%2Fddev-varnish/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddev%2Fddev-varnish/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddev%2Fddev-varnish/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ddev","download_url":"https://codeload.github.com/ddev/ddev-varnish/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248478827,"owners_count":21110770,"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":["ddev-get"],"created_at":"2024-11-14T20:10:16.882Z","updated_at":"2025-04-11T20:41:39.467Z","avatar_url":"https://github.com/ddev.png","language":"Shell","funding_links":["https://github.com/sponsors/ddev","https://www.paypal.com/donate/?hosted_button_id=MCNCSZHC7LHSQ","https://ddev.com/support-ddev/"],"categories":[],"sub_categories":[],"readme":"[![tests](https://github.com/ddev/ddev-varnish/actions/workflows/tests.yml/badge.svg)](https://github.com/ddev/ddev-varnish/actions/workflows/tests.yml) ![project is maintained](https://img.shields.io/maintenance/yes/2025.svg)\n\n# ddev-varnish\n\nThis repository allows you to quickly install the Varnish reverse proxy into a [DDEV](https://ddev.readthedocs.io) project using the instructions below.\n\n## Installation\n\nFor DDEV v1.23.5 or above run\n\n```sh\nddev add-on get ddev/ddev-varnish\n```\n\nFor earlier versions of DDEV run\n\n```sh\nddev get ddev/ddev-varnish\n```\n\nThen restart your project\n\n```sh\nddev restart\n```\n\n\u003e [!NOTE]\n\u003e If you change `additional_hostnames` or `additional_fqdns`, you have to re-run `ddev add-on get ddev/ddev-varnish`\n\n## Explanation\n\nThe Varnish service inserts itself between ddev-router and the web container, so that calls\nto the web container are routed through Varnish first. The [docker-compose.varnish.yaml](docker-compose.varnish.yaml)\ninstalls Varnish and uses the default domain as its own host name. A `docker-compose.varnish_extras.yaml` file is generated on install which replaces the `VIRTUAL_HOST` variable of the web container with a sub-domain of the website URL. For example, `mysite.ddev.site`, would be accessible via Varnish on `mysite.ddev.site` and directly on `novarnish.mysite.ddev.site`.\n\nIf you use a `project_tld` other than `ddev.site` or `additional_fqdns` DDEV will help add hosts entries for the hostnames automagically; however, you'll need to add entries for the `novarnish.*` sub-domains yourself, e.g. `ddev hostname novarnish.testaddfqdn.random.tld 127.0.0.1`.\n\nRun `ddev add-on get ddev/ddev-varnish` after changes to `name`, `additional_hostnames`, `additional_fqdns`, or `project_tld` in `.ddev/config.yaml` so that `.ddev/docker-compose.varnish_extras.yaml` is regenerated.\n\n## Helper commands\n\nThis addon also providers several helper commands. These helpers allow developers to run Varnish commands from the host, however, the commands are actually run inside the Varnish container.\n\n| Command | Description |\n| --- | --- |\n| `ddev varnishd` | Varnish-cli |\n| `ddev varnishadm` | Control a running Varnish instance |\n| `ddev varnishhist` | Display Varnish request histogram |\n| `ddev varnishlog` | Display Varnish logs |\n| `ddev varnishncsa` | Display Varnish logs in Apache / NCSA combined log format |\n| `ddev varnishstat` | Display Varnish Cache statistics |\n| `ddev varnishtest` | Test program for Varnish |\n| `ddev varnishtop` | Display Varnish log entry ranking |\n\nSee [The Varnish Reference Manual](https://varnish-cache.org/docs/6.5/reference/index.html) for more information about the commands, their flags, and their arguments.\n\n## Additional Configuration\n\n* You may want to edit the `.ddev/varnish/default.vcl` to meet your needs. Remember to remove `#ddev-generated` from the file if you want your changes to the file preserved.\n\n**Maintained by [@jedubois](https://github.com/jedubois) and [@rfay](https://github.com/rfay)**\n\n**Based on the original [ddev-contrib recipe](https://github.com/ddev/ddev-contrib/tree/master/docker-compose-services/varnish) pioneered by [rikwillems](https://github.com/rikwillems)**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fddev%2Fddev-varnish","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fddev%2Fddev-varnish","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fddev%2Fddev-varnish/lists"}