Ensure Varnish can mount custom configurations

This commit is contained in:
cytopia 2019-02-17 11:53:43 +01:00
parent 325acdf89a
commit 6fb39c0e69
No known key found for this signature in database
GPG Key ID: 6D56EDB8695128A2
6 changed files with 33 additions and 0 deletions

5
.gitignore vendored
View File

@ -98,6 +98,11 @@
/cfg/php-startup-7.4/*.sh
/cfg/php-startup-8.0/*.sh
# Ignorecustom Varnish configs
/cfg/varnish-4/*.vcl
/cfg/varnish-5/*.vcl
/cfg/varnish-6/*.vcl
# Ignore custom PHP-FPM modules
/mod/php-fpm-5.2/*.so
/mod/php-fpm-5.3/*.so

8
cfg/varnish-4/README.md Normal file
View File

@ -0,0 +1,8 @@
# Custom Varnish configuration
Place your `*.vcl` files here to customize Varnish.
* This directory will be mounted into `/etc/varnish.d/` into the Varnish container.
* Ensure to point your `VARNISH_CONFIG` variable to `/etc/varnish.d/<my-file>.vcl` when you want to use it
* Ensure to set your Backend server to `httpd` in your custom varnish config
* Ensure to set your Backend port to `80` in your custom varnish config

8
cfg/varnish-5/README.md Normal file
View File

@ -0,0 +1,8 @@
# Custom Varnish configuration
Place your `*.vcl` files here to customize Varnish.
* This directory will be mounted into `/etc/varnish.d/` into the Varnish container.
* Ensure to point your `VARNISH_CONFIG` variable to `/etc/varnish.d/<my-file>.vcl` when you want to use it
* Ensure to set your Backend server to `httpd` in your custom varnish config
* Ensure to set your Backend port to `80` in your custom varnish config

8
cfg/varnish-6/README.md Normal file
View File

@ -0,0 +1,8 @@
# Custom Varnish configuration
Place your `*.vcl` files here to customize Varnish.
* This directory will be mounted into `/etc/varnish.d/` into the Varnish container.
* Ensure to point your `VARNISH_CONFIG` variable to `/etc/varnish.d/<my-file>.vcl` when you want to use it
* Ensure to set your Backend server to `httpd` in your custom varnish config
* Ensure to set your Backend port to `80` in your custom varnish config

View File

@ -84,6 +84,8 @@ services:
- VARNISHD_PARAMS=${VARNISH_PARAMS:--p default_ttl=3600 -p default_grace=3600}
- BACKEND_HOST=httpd
- BACKEND_PORT=80
volumes:
- ${DEVILBOX_PATH}/cfg/varnish-${VARNISH_SERVER:-6}:/etc/varnish.d
depends_on:
- bind
- php

View File

@ -15,6 +15,8 @@ services:
- VARNISHD_PARAMS=${VARNISH_PARAMS:--p default_ttl=3600 -p default_grace=3600}
- BACKEND_HOST=httpd
- BACKEND_PORT=80
volumes:
- ${DEVILBOX_PATH}/cfg/varnish-${VARNISH_SERVER:-6}:/etc/varnish.d
depends_on:
- bind
- php