Skip to content

Commit 7e665f6

Browse files
committed
docker-compose.yml: add cache sidecar to log the requests on http-cache
That we maybe can see why the e2e tests fail sometimes. This seems to be the way to get logging out of varnish. https://varnish-cache.org/docs/trunk/users-guide/operation-logging.html https://superuser.com/questions/1713850/outputting-logging-with-varnish-when-using-docker-compose-docker-desktop
1 parent ac1b5b9 commit 7e665f6

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.github/workflows/reusable-e2e-tests-run.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
- run: docker compose -f docker-compose.yml run --rm api migrate-database
6565

6666
# start necessary containers
67-
- run: docker compose -f docker-compose.yml up -d api frontend pdf print browserless database docker-host http-cache mail pg-admin reverse-proxy
67+
- run: docker compose -f docker-compose.yml up -d api frontend pdf print browserless database docker-host http-cache http-cache-logs mail pg-admin reverse-proxy
6868

6969
# pull cypress while container are starting up
7070
- run: docker compose pull e2e

docker-compose.yml

+11
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,21 @@ services:
6262
- api
6363
volumes:
6464
- ./api/docker/varnish/vcl/:/etc/varnish/:ro
65+
- varnish_data:/var/lib/varnish
6566
command: -a :8081,HTTP -p http_max_hdr=96
6667
environment:
6768
- COOKIE_PREFIX=localhost_
6869
- SEND_XKEY_HEADERS_DOWNSTREAM=${SEND_XKEY_HEADERS_DOWNSTREAM:-true}
6970
- VARNISH_HTTP_PORT=8080
71+
72+
http-cache-logs:
73+
image: varnish:7.6.1
74+
container_name: 'ecamp3-http-cache-log'
75+
depends_on:
76+
- http-cache
77+
volumes:
78+
- varnish_data:/var/lib/varnish:ro
79+
command: varnishncsa
7080

7181
pdf:
7282
image: node:22.14.0
@@ -215,3 +225,4 @@ volumes:
215225
db-data-postgres: null
216226
caddy_data:
217227
caddy_config:
228+
varnish_data:

0 commit comments

Comments
 (0)