Add DISABLE_CACHE config templating option.
This commit is contained in:
parent
876e6e4b01
commit
90970c98a9
|
@ -53,6 +53,10 @@ variables:
|
||||||
If set to `yes` then squid configuration templating is disabled entirely, allowing
|
If set to `yes` then squid configuration templating is disabled entirely, allowing
|
||||||
bind mounting the configuration file in manually instead. The certificate and SSL
|
bind mounting the configuration file in manually instead. The certificate and SSL
|
||||||
setup still runs normally.
|
setup still runs normally.
|
||||||
|
* `DISABLE_CACHE`
|
||||||
|
Default ``
|
||||||
|
If set to `yes` then squid configuration templating removes all `cache_dir`
|
||||||
|
lines, setting squid to memory only cache.
|
||||||
|
|
||||||
# Proxychains
|
# Proxychains
|
||||||
By default squid in SSL MITM mode treats `cache_peer` entries quite differently.
|
By default squid in SSL MITM mode treats `cache_peer` entries quite differently.
|
||||||
|
|
|
@ -10,8 +10,10 @@ netdb_filename stdio:/var/cache/squid4/netdb.state
|
||||||
# Visible hostname to allow multi-squid
|
# Visible hostname to allow multi-squid
|
||||||
visible_hostname {{VISIBLE_HOSTNAME|default:"docker-squid4"}}
|
visible_hostname {{VISIBLE_HOSTNAME|default:"docker-squid4"}}
|
||||||
|
|
||||||
|
{% if DISABLE_CACHE|default:"" != "yes" %}
|
||||||
# Cache directory is fixed since we'll bind mount.
|
# Cache directory is fixed since we'll bind mount.
|
||||||
cache_dir aufs /var/cache/squid4 {{MAX_CACHE_SIZE|default:"40000"}} 16 256
|
cache_dir aufs /var/cache/squid4 {{MAX_CACHE_SIZE|default:"40000"}} 16 256
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
maximum_object_size {{MAX_OBJECT_SIZE|default:"1536 MB"}}
|
maximum_object_size {{MAX_OBJECT_SIZE|default:"1536 MB"}}
|
||||||
cache_mem {{MEM_CACHE_SIZE|default:"128 MB"}}
|
cache_mem {{MEM_CACHE_SIZE|default:"128 MB"}}
|
||||||
|
|
Loading…
Reference in New Issue