Skip to content

Commit

Permalink
update to ddev domain (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
tyler36 authored Feb 3, 2023
1 parent af8f7c8 commit 41b3545
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ defaults:
shell: bash

env:
NIGHTLY_DDEV_PR_URL: "https://nightly.link/drud/ddev/actions/runs/1720215802/ddev-linux-amd64.zip"
NIGHTLY_DDEV_PR_URL: "https://nightly.link/ddev/ddev/actions/runs/1720215802/ddev-linux-amd64.zip"
# Allow ddev get to use a github token to prevent rate limiting by tests
DDEV_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
Expand Down Expand Up @@ -50,15 +50,15 @@ jobs:
- name: Use ddev stable
if: matrix.ddev_version == 'stable'
run: brew install drud/ddev/ddev
run: brew install ddev/ddev/ddev

- name: Use ddev edge
if: matrix.ddev_version == 'edge'
run: brew install drud/ddev-edge/ddev
run: brew install ddev/ddev-edge/ddev

- name: Use ddev HEAD
if: matrix.ddev_version == 'HEAD'
run: brew install --HEAD drud/ddev/ddev
run: brew install --HEAD ddev/ddev/ddev

- name: Use ddev PR
if: matrix.ddev_version == 'PR'
Expand All @@ -68,7 +68,7 @@ jobs:
mv ddev /usr/local/bin/ddev && chmod +x /usr/local/bin/ddev
- name: Download docker images
run: |
run: |
mkdir junk && pushd junk && ddev config --omit-containers=dba,db && ddev debug download-images >/dev/null
- name: tmate debugging session
uses: mxschmitt/action-tmate@v3
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
[![tests](https://github.com/drud/ddev-varnish/actions/workflows/tests.yml/badge.svg)](https://github.com/drud/ddev-varnish/actions/workflows/tests.yml) ![project is maintained](https://img.shields.io/maintenance/yes/2024.svg)
[![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/2024.svg)

# ddev-varnish

This repository allows you to quickly install the Varnish reverse proxy into a [DDEV](https://ddev.readthedocs.io) project using just `ddev get drud/ddev-varnish`.
This repository allows you to quickly install the Varnish reverse proxy into a [DDEV](https://ddev.readthedocs.io) project using just `ddev get ddev/ddev-varnish`.

## Installation

1. `ddev get drud/ddev-varnish`
1. `ddev get ddev/ddev-varnish`
2. `ddev restart`

## Explanation

The Varnish service inserts itself between ddev-router and the web container, so that calls
to the web container are routed through Varnish first. The [docker-compose.varnish.yaml](https://github.com/drud/ddev-contrib/blob/master/docker-compose-services/varnish/docker-compose.varnish.yml)
to the web container are routed through Varnish first. The [docker-compose.varnish.yaml](https://github.com/ddev/ddev-contrib/blob/master/docker-compose-services/varnish/docker-compose.varnish.yml)
installs 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.

If 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`.

Run `ddev get drud/ddev-varnish` after changes to name, additional_hostnames, additional_fqdns, or project_tld in .ddev/config.yml so that .ddev/docker-compose.varnish-extras.yaml is regenerated.
Run `ddev get ddev/ddev-varnish` after changes to name, additional_hostnames, additional_fqdns, or project_tld in .ddev/config.yml so that .ddev/docker-compose.varnish-extras.yaml is regenerated.

## Helper commands

Expand All @@ -41,4 +41,4 @@ See [The Varnish Reference Manual](https://varnish-cache.org/docs/6.5/reference/

**Maintained by [@jedebois](https://github.com/jedubois) and [@rfay](https://github.com/rfay)**

**Based on the original [ddev-contrib recipe](https://github.com/drud/ddev-contrib/tree/master/docker-compose-services/varnish) pioneered by [rikwillems](https://github.com/rikwillems)**
**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)**
4 changes: 2 additions & 2 deletions tests/test.bats
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ teardown() {
@test "install from release" {
set -eu -o pipefail
cd ${TESTDIR} || ( printf "unable to cd to ${TESTDIR}\n" && exit 1 )
echo "# ddev get drud/ddev-varnish with project ${PROJNAME} in ${TESTDIR} ($(pwd))" >&3
ddev get drud/ddev-varnish >/dev/null
echo "# ddev get ddev/ddev-varnish with project ${PROJNAME} in ${TESTDIR} ($(pwd))" >&3
ddev get ddev/ddev-varnish >/dev/null
ddev restart >/dev/null 2>&1
for url in http://${PROJNAME}.ddev.site/ http://extrahostname.ddev.site/ http://extrafqdn.ddev.site/ https://${PROJNAME}.ddev.site/ https://extrahostname.ddev.site/ https://extrafqdn.ddev.site/ ; do
# It's "Via:" with http and "via:" with https. Tell me why.
Expand Down

0 comments on commit 41b3545

Please sign in to comment.