Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VARNISH_TTL env has no effect #76

Closed
namedgraph opened this issue Sep 2, 2024 · 1 comment
Closed

VARNISH_TTL env has no effect #76

namedgraph opened this issue Sep 2, 2024 · 1 comment

Comments

@namedgraph
Copy link

namedgraph commented Sep 2, 2024

  varnish:
    image: varnish:7.3.0
    environment:
      - VARNISH_TTL=86400
      - VARNISH_SIZE=1G

I've been using this configuration for a long time (possibly starting with my own Docker image for Varnish) but only now (using version 7.3.0) have I noticed that the $VARNISH_TTL value has no effect and the TTL seems to default to 120 😅

Has this never worked in the official image or is something broken?
There is a PR #73 mentioning VARNISH_TTL but it does not seem that it actually introduces support for it?

How should I specify the default TTL using a docker-compose config?

@gquintard
Copy link
Collaborator

Hi!

VARNISH_TTL is indeed not a variable we check, but varnishd allows you to just add -t 45 to change the default TTL

Just to be sure: check https://info.varnish-software.com/blog/painful-varnish-mistakes to see how default_ttl works, it can be a bit counter-intuitive

I'm closing this issue as I think there's nothing to do here, but feel free to continue the discussion here on on discord

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants