This repository has been archived by the owner on Jul 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #186 from jdeathe/centos-7-develop
Release changes for 2.3.0
- Loading branch information
Showing
30 changed files
with
2,765 additions
and
1,220 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
.env | ||
.env.example | ||
.git | ||
.gitignore | ||
dist | ||
test | ||
var | ||
docker-compose.yml | ||
LICENSE | ||
README-short.txt | ||
*.md | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
VARNISH_MAX_THREADS=1000 | ||
VARNISH_MIN_THREADS=50 | ||
VARNISH_OPTIONS= | ||
VARNISH_STORAGE=file,/var/lib/varnish/varnish_storage.bin,1G | ||
VARNISH_THREAD_TIMEOUT=120 | ||
VARNISH_TTL=120 | ||
VARNISH_VARNISHNCSA_FORMAT=%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-agent}i" | ||
VARNISH_VARNISHNCSA_OPTIONS= | ||
VARNISH_VCL_CONF=/etc/varnish/docker-default.vcl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
.env | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,97 +1,86 @@ | ||
# ============================================================================= | ||
# jdeathe/centos-ssh-varnish | ||
# | ||
# CentOS-7, Varnish 6.1 | ||
# | ||
# ============================================================================= | ||
FROM jdeathe/centos-ssh:2.4.1 | ||
FROM jdeathe/centos-ssh:2.5.1 | ||
|
||
# ----------------------------------------------------------------------------- | ||
# Install Varnish Cache | ||
# ----------------------------------------------------------------------------- | ||
RUN { \ | ||
echo '[varnishcache_varnish61]'; \ | ||
echo 'name=varnishcache_varnish61'; \ | ||
echo 'baseurl=https://packagecloud.io/varnishcache/varnish61/el/7/$basearch'; \ | ||
echo 'repo_gpgcheck=1'; \ | ||
echo 'gpgcheck=0'; \ | ||
echo 'enabled=1'; \ | ||
echo 'gpgkey=https://packagecloud.io/varnishcache/varnish61/gpgkey'; \ | ||
echo 'sslverify=1'; \ | ||
echo 'sslcacert=/etc/pki/tls/certs/ca-bundle.crt'; \ | ||
echo 'metadata_expire=300'; \ | ||
ARG RELEASE_VERSION="2.3.0" | ||
|
||
# ------------------------------------------------------------------------------ | ||
# Base install of required packages | ||
# ------------------------------------------------------------------------------ | ||
RUN { printf -- \ | ||
'[%s]\nname=%s\nbaseurl=%s\nrepo_gpgcheck=%s\ngpgcheck=%s\nenabled=%s\ngpgkey=%s\nsslverify=%s\nsslcacert=%s\nmetadata_expire=%s\n' \ | ||
'varnishcache_varnish62' \ | ||
'varnishcache_varnish62' \ | ||
'https://packagecloud.io/varnishcache/varnish62/el/7/$basearch' \ | ||
'1' \ | ||
'0' \ | ||
'1' \ | ||
'https://packagecloud.io/varnishcache/varnish62/gpgkey' \ | ||
'1' \ | ||
'/etc/pki/tls/certs/ca-bundle.crt' \ | ||
'300'; \ | ||
} > /etc/yum.repos.d/varnishcache_varnish61.repo \ | ||
&& yum -y install \ | ||
--setopt=tsflags=nodocs \ | ||
--disableplugin=fastestmirror \ | ||
gcc-4.8.5-36.el7 \ | ||
varnish-6.1.1-1.el7 \ | ||
gcc-4.8.5-36.el7_6.1 \ | ||
varnish-6.2.0-1.el7 \ | ||
&& yum versionlock add \ | ||
varnish \ | ||
gcc \ | ||
&& rm -rf /var/cache/yum/* \ | ||
&& yum clean all | ||
|
||
# ----------------------------------------------------------------------------- | ||
# ------------------------------------------------------------------------------ | ||
# Copy files into place | ||
# ----------------------------------------------------------------------------- | ||
ADD src/usr/bin \ | ||
/usr/bin/ | ||
ADD src/usr/sbin \ | ||
/usr/sbin/ | ||
ADD src/opt/scmi \ | ||
/opt/scmi/ | ||
ADD src/etc/services-config/supervisor/supervisord.d \ | ||
/etc/services-config/supervisor/supervisord.d/ | ||
ADD src/etc/services-config/varnish/docker-default.vcl \ | ||
/etc/services-config/varnish/ | ||
ADD src/etc/systemd/system \ | ||
/etc/systemd/system/ | ||
# ------------------------------------------------------------------------------ | ||
ADD src / | ||
|
||
RUN ln -sf \ | ||
/etc/services-config/supervisor/supervisord.d/varnishd-wrapper.conf \ | ||
/etc/supervisord.d/varnishd-wrapper.conf \ | ||
&& ln -sf \ | ||
/etc/services-config/supervisor/supervisord.d/varnishncsa-wrapper.conf \ | ||
/etc/supervisord.d/varnishncsa-wrapper.conf \ | ||
&& ln -sf \ | ||
/etc/services-config/varnish/docker-default.vcl \ | ||
/etc/varnish/docker-default.vcl \ | ||
# ------------------------------------------------------------------------------ | ||
# Provisioning | ||
# - Replace placeholders with values in systemd service unit template | ||
# - Symbolic link varnish access log file to stdout | ||
# - Create directory for varnishncsa PID file | ||
# - Set permissions | ||
# ------------------------------------------------------------------------------ | ||
RUN sed -i \ | ||
-e "s~{{RELEASE_VERSION}}~${RELEASE_VERSION}~g" \ | ||
/etc/systemd/system/[email protected] \ | ||
&& mkdir -p \ | ||
/var/{lib/misc,lock/subsys,run}/varnish \ | ||
&& chown \ | ||
varnishlog:varnish \ | ||
/var/{lib/misc,lock/subsys,run}/varnish \ | ||
&& chmod 644 \ | ||
/etc/varnish/*.vcl \ | ||
&& chmod 700 \ | ||
/usr/{bin/healthcheck,sbin/{varnishd,varnishncsa}-wrapper} \ | ||
&& chmod 750 \ | ||
/usr/sbin/varnishncsa-wrapper \ | ||
&& chgrp varnish \ | ||
/usr/sbin/varnishncsa-wrapper \ | ||
&& mkdir -p \ | ||
/var/run/varnish \ | ||
&& chown \ | ||
varnishlog:varnish \ | ||
/var/run/varnish | ||
/usr/sbin/varnishncsa-wrapper | ||
|
||
EXPOSE 80 8443 | ||
|
||
# ----------------------------------------------------------------------------- | ||
# ------------------------------------------------------------------------------ | ||
# Set default environment variables | ||
# ----------------------------------------------------------------------------- | ||
# ------------------------------------------------------------------------------ | ||
ENV SSH_AUTOSTART_SSHD="false" \ | ||
SSH_AUTOSTART_SSHD_BOOTSTRAP="false" \ | ||
SSH_AUTOSTART_SUPERVISOR_STDOUT="false" \ | ||
VARNISH_AUTOSTART_VARNISHD_WRAPPER="true" \ | ||
VARNISH_AUTOSTART_VARNISHNCSA_WRAPPER="false" \ | ||
VARNISH_MAX_THREADS="1000" \ | ||
VARNISH_MIN_THREADS="50" \ | ||
VARNISH_OPTIONS="" \ | ||
VARNISH_STORAGE="file,/var/lib/varnish/varnish_storage.bin,1G" \ | ||
VARNISH_THREAD_TIMEOUT="120" \ | ||
VARNISH_TTL="120" \ | ||
VARNISH_VARNISHNCSA_FORMAT="%h %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-agent}i\"" \ | ||
VARNISH_VARNISHNCSA_OPTIONS="" \ | ||
VARNISH_VCL_CONF="/etc/varnish/docker-default.vcl" | ||
|
||
# ----------------------------------------------------------------------------- | ||
# ------------------------------------------------------------------------------ | ||
# Set image metadata | ||
# ----------------------------------------------------------------------------- | ||
ARG RELEASE_VERSION="2.2.1" | ||
# ------------------------------------------------------------------------------ | ||
LABEL \ | ||
maintainer="James Deathe <[email protected]>" \ | ||
install="docker run \ | ||
|
@@ -118,12 +107,12 @@ jdeathe/centos-ssh-varnish:${RELEASE_VERSION} \ | |
org.deathe.license="MIT" \ | ||
org.deathe.vendor="jdeathe" \ | ||
org.deathe.url="https://github.com/jdeathe/centos-ssh-varnish" \ | ||
org.deathe.description="CentOS-7 7.5.1804 x86_64 - Varnish Cache 6.1." | ||
org.deathe.description="CentOS-7 7.5.1804 x86_64 - Varnish Cache 6.2." | ||
|
||
HEALTHCHECK \ | ||
--interval=0.5s \ | ||
--interval=1s \ | ||
--timeout=1s \ | ||
--retries=4 \ | ||
--retries=5 \ | ||
CMD ["/usr/bin/healthcheck"] | ||
|
||
CMD ["/usr/bin/supervisord", "--configuration=/etc/supervisord.conf"] | ||
CMD ["/usr/bin/supervisord", "--configuration=/etc/supervisord.conf"] |
Oops, something went wrong.