Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Commit

Permalink
Merge pull request #34 from jdeathe/centos-6-develop
Browse files Browse the repository at this point in the history
Release changes for 1.3.1
  • Loading branch information
jdeathe authored Nov 28, 2016
2 parents f3cea7e + f45e770 commit 4a24a7b
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 21 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
8 changes: 1 addition & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,8 @@ EXPOSE 80 8443
# -----------------------------------------------------------------------------
ENV SSH_AUTOSTART_SSHD=false \
SSH_AUTOSTART_SSHD_BOOTSTRAP=false \
VARNISH_ADMIN_LISTEN_ADDRESS="127.0.0.1" \
VARNISH_ADMIN_LISTEN_PORT="6082" \
VARNISH_LISTEN_ADDRESS="0.0.0.0" \
VARNISH_LISTEN_PORT="80 -a 0.0.0.0:8443" \
VARNISH_MAX_THREADS="1000" \
VARNISH_MIN_THREADS="50" \
VARNISH_PIDFILE="/var/run/varnish.pid" \
VARNISH_SECRET_FILE="/etc/varnish/secret" \
VARNISH_STORAGE="file,/var/lib/varnish/varnish_storage.bin,1G" \
VARNISH_THREAD_TIMEOUT="120" \
VARNISH_TTL="120" \
Expand All @@ -69,7 +63,7 @@ ENV SSH_AUTOSTART_SSHD=false \
# -----------------------------------------------------------------------------
# Set image metadata
# -----------------------------------------------------------------------------
ARG RELEASE_VERSION="1.3.0"
ARG RELEASE_VERSION="1.3.1"
LABEL \
install="docker run \
--rm \
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Docker Image including CentOS-6 6.8 x86_64 and Varnish Cache 4.1.

#### centos-6

The latest CentOS-6 based release can be pulled from the `centos-6` Docker tag. For a specific release tag the convention is `centos-6-1.2.0` for the [1.2.0](https://github.com/jdeathe/centos-ssh-varnish/tree/1.0.0) release tag.
The latest CentOS-6 based release can be pulled from the `centos-6` Docker tag. For a specific release tag the convention is `centos-6-1.3.0` for the [1.3.0](https://github.com/jdeathe/centos-ssh-varnish/tree/1.3.0) release tag.

Included in the build are the [SCL](https://www.softwarecollections.org/), [EPEL](http://fedoraproject.org/wiki/EPEL) and [IUS](https://ius.io) repositories. Installed packages include [OpenSSH](http://www.openssh.com/portable.html) secure shell, [vim-minimal](http://www.vim.org/), are installed along with python-setuptools, [supervisor](http://supervisord.org/) and [supervisor-stdout](https://github.com/coderanger/supervisor-stdout).

Expand Down Expand Up @@ -78,7 +78,7 @@ $ docker logs varnish.pool-1.1.1

#### Environment Variables

There are several environmental variables defined at runtime which allows the operator to customise the running container. This may become necessary under special circumstances and the following show those that are most likely to be considered for review, the rest should be left unaltered and for clarification refer to the [varnishd documentation](https://www.varnish-cache.org/docs/3.0/reference/varnishd.html).
There are several environmental variables defined at runtime which allows the operator to customise the running container. This may become necessary under special circumstances and the following show those that are most likely to be considered for review, the rest should be left unaltered and for clarification refer to the [varnishd documentation](https://www.varnish-cache.org/docs/4.1/index.html).

##### VARNISH_VCL_CONF

Expand All @@ -94,4 +94,4 @@ Start at least `VARNISH_MIN_THREADS` but no more than `VARNISH_MAX_THREADS` work

##### VARNISH_STORAGE

Use `VARNISH_STORAGE` to specify the storage backend. See the [varnishd documentation](https://www.varnish-cache.org/docs/3.0/reference/varnishd.html#storage-types) for the types and parameters available. The default is a file type backend but it is recommended to use malloc if there is enough RAM available.
Use `VARNISH_STORAGE` to specify the storage backend. See the [varnishd documentation](https://www.varnish-cache.org/docs/4.1/reference/varnishd.html?highlight=storage%20types#storage-backend-options) for the types and parameters available. The default is a file type backend but it is recommended to use malloc if there is enough RAM available.
12 changes: 3 additions & 9 deletions etc/services-config/varnish/docker-default.vcl
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,8 @@ sub vcl_recv {
unset req.http.X-Forwarded-Port;
unset req.http.X-Forwarded-Proto;

if (req.http.X-Forwarded-For &&
req.http.X-Forwarded-For != ("" + client.ip)) {
set req.http.X-Forwarded-For = req.http.X-Forwarded-For + ", " + client.ip;
} else if ( ! req.http.X-Forwarded-For) {
set req.http.X-Forwarded-For = client.ip;
}

if (std.port(server.ip) == 8443) {
if (std.port(server.ip) == 443 ||
std.port(server.ip) == 8443) {
# SSL Terminated upstream so indcate this with a custom header
set req.http.X-Forwarded-Port = "443";
set req.http.X-Forwarded-Proto = "https";
Expand All @@ -70,7 +64,7 @@ sub vcl_recv {
return (synth(403));
}

set req.http.X-Varnish-Grace = "none";
# set req.http.X-Varnish-Grace = "none";

if (req.method != "GET" &&
req.method != "HEAD" &&
Expand Down
2 changes: 1 addition & 1 deletion etc/systemd/system/centos-ssh-varnish@.service
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Environment="DOCKER_USER=jdeathe"
Environment="DOCKER_CONTAINER_OPTS="
Environment="DOCKER_IMAGE_PACKAGE_PATH=/var/opt/scmi/packages"
Environment="DOCKER_IMAGE_NAME=centos-ssh-varnish"
Environment="DOCKER_IMAGE_TAG=centos-6-1.3.0"
Environment="DOCKER_IMAGE_TAG=centos-6-1.3.1"
Environment="DOCKER_PORT_MAP_TCP_80=8000"
Environment="DOCKER_PORT_MAP_TCP_8443=8500"
Environment="ULIMIT_MEMLOCK=82000"
Expand Down
2 changes: 1 addition & 1 deletion usr/sbin/varnishd-wrapper
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ DAEMON_OPTS="-j unix,user=varnish,ccgroup=varnish
-F
-P /var/run/varnish.pid
-a 0.0.0.0:80
-a 0.0.0.0:8443
-a 0.0.0.0:8443,PROXY
-f ${VARNISH_VCL_CONF:-/etc/varnish/docker-default.vcl}
-T 127.0.0.1:6082
-t ${VARNISH_TTL:-120}
Expand Down

0 comments on commit 4a24a7b

Please sign in to comment.