laradock/varnish/start.sh

18 lines
344 B
Bash
Raw Permalink Normal View History

2017-03-23 14:52:30 +08:00
#!/usr/bin/env bash
set -e
for name in BACKEND_PORT BACKEND_HOST VARNISH_SERVER
do
eval value=\$$name
sed -i "s|\${${name}}|${value}|g" /etc/varnish/default.vcl
done
exec bash -c \
"exec varnishd \
-a :$VARNISH_PORT \
-T localhost:6082 \
-F \
2017-03-23 14:52:30 +08:00
-f $VARNISH_CONFIG \
-s malloc,$CACHE_SIZE \
$VARNISHD_PARAMS"