Commit 086509d5 authored by Geoff Simmons's avatar Geoff Simmons

varnishd is invoked via exec in a bash script.

This makes it possible to set values for the invocation via env
variables in the pod template, in particular to use PROXY.
parent d1541688
......@@ -6,13 +6,14 @@ RUN yum install -y epel-release && yum update -y -q && \
yum install -y -q varnish-6.1.1 && \
yum install -y -q --nogpgcheck vmod-re2 && \
yum clean all && rm -rf /var/cache/yum
RUN mkdir /var/run/varnish
RUN /bin/mkdir /var/run/varnish
COPY bogo_backend.vcl /etc/varnish/
COPY ready.vcl /etc/varnish/
COPY notavailable.vcl /etc/varnish
COPY boot.vcl /etc/varnish
COPY start.cli /etc/varnish
ENTRYPOINT ["/usr/sbin/varnishd", "-F", "-a", ":80", "-a", "k8s=:8080", \
"-S", "/var/run/varnish/_.secret", "-T", "0.0.0.0:6081", \
"-p", "vcl_path=/etc/varnish", "-I", "/etc/varnish/start.cli", \
"-f", ""]
COPY varnishd_exec.sh /
RUN /bin/chmod 755 /varnishd_exec.sh
ENV HTTP_PORT=80 PROTO=HTTP READY_PORT=8080 SECRET_PATH=/var/run/varnish \
SECRET_FILE=_.secret ADMIN_PORT=6081
ENTRYPOINT ["/varnishd_exec.sh"]
#!/bin/bash
set -e
set -u
exec /usr/sbin/varnishd -F -a :${HTTP_PORT},${PROTO} -a k8s=:${READY_PORT} \
-S ${SECRET_PATH}/${SECRET_FILE} -T 0.0.0.0:${ADMIN_PORT} \
-p vcl_path=/etc/varnish -I /etc/varnish/start.cli -f '' "$@"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment