Skip to content

Commit 174f6cd

Browse files
authored
feat: use bash for ddev ssh -s varnish (#48)
1 parent d0c864e commit 174f6cd

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ This add-on also providers several helper commands. These helpers allow develope
4343
| `ddev varnishstat` | Display Varnish Cache statistics |
4444
| `ddev varnishtest` | Test program for Varnish |
4545
| `ddev varnishtop` | Display Varnish log entry ranking |
46-
| `ddev logs -s varnish` | Check Varnish logs |
4746
| `ddev varnish-config-reload` | Reloads the varnish current config to apply changes |
47+
| `ddev describe` | View service status and used ports for Varnish |
48+
| `ddev ssh -s varnish` | Go into the Varnish container shell |
49+
| `ddev logs -s varnish` | Check Varnish logs |
4850

4951
See [The Varnish Reference Manual](https://varnish-cache.org/docs/6.0/reference/index.html) for more information about the commands, their flags, and their arguments.
5052

docker-compose.varnish.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ services:
1616
# your default.vcl should be.
1717
- "./varnish:/etc/varnish"
1818
- ".:/mnt/ddev_config"
19+
- "ddev-global-cache:/mnt/ddev-global-cache"
1920
depends_on:
2021
- web
2122
entrypoint: docker-varnish-entrypoint ${VARNISH_VARNISHD_PARAMS:--p http_max_hdr=1000 -p http_resp_hdr_len=1M -p http_resp_size=2M -p workspace_backend=3M -p workspace_client=3M}
23+
x-ddev:
24+
ssh-shell: bash

tests/test.bats

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ setup() {
5151
}
5252

5353
health_checks() {
54+
# Check that bash is available in the varnish container
55+
run ddev exec -s varnish command -v bash
56+
assert_success
57+
assert_output --partial "bash"
58+
5459
# Test that .ddev/docker-compose.varnish_extra.yaml created correct env vars
5560
run ddev exec echo "\$HTTP_EXPOSE"
5661
assert_success

0 commit comments

Comments
 (0)