mirror of
https://github.com/KevinMidboe/schleppe-ha-project.git
synced 2026-02-14 19:49:08 +00:00
ansible plays for docker, haproxy & varnish
This commit is contained in:
44
ansible/roles/varnish/templates/varnish-systemd.j2
Normal file
44
ansible/roles/varnish/templates/varnish-systemd.j2
Normal file
@@ -0,0 +1,44 @@
|
||||
[Unit]
|
||||
Description=Varnish HTTP accelerator
|
||||
Documentation=https://www.varnish-cache.org/docs/6.1/ man:varnishd
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
|
||||
# Maximum number of open files (for ulimit -n)
|
||||
LimitNOFILE=131072
|
||||
|
||||
# Locked shared memory - should suffice to lock the shared memory log
|
||||
# (varnishd -l argument)
|
||||
# Default log size is 80MB vsl + 1M vsm + header -> 82MB
|
||||
# unit is bytes
|
||||
# LimitMEMLOCK=85983232
|
||||
|
||||
# Varnish default
|
||||
LimitMEMLOCK=82000
|
||||
|
||||
# Enable this to avoid "fork failed" on reload.
|
||||
TasksMax=infinity
|
||||
|
||||
# Maximum size of the corefile.
|
||||
LimitCORE=infinity
|
||||
|
||||
ExecStart=/usr/sbin/varnishd \
|
||||
-j unix,user=vcache \
|
||||
-F \
|
||||
-a :80 \
|
||||
-a :443 \
|
||||
-p feature=+http2 \
|
||||
-T localhost:6082 \
|
||||
-f /etc/varnish/default.vcl \
|
||||
-S /etc/varnish/secret \
|
||||
-s malloc,256m
|
||||
|
||||
ExecReload=/usr/share/varnish/varnishreload
|
||||
ProtectSystem=full
|
||||
ProtectHome=true
|
||||
PrivateTmp=true
|
||||
PrivateDevices=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user