项目作者: mikoj

项目描述 :
This is Varnish Cache docker image, the high-performance HTTP accelerator.
高级语言: Dockerfile
项目地址: git://github.com/mikoj/varnishcache.git
创建时间: 2017-09-02T07:19:05Z
项目社区:https://github.com/mikoj/varnishcache

开源协议:MIT License

下载


varnishcache

Varnish Cache Server that runs inside a Docker container.

How to run the server

  1. Set the environment variables you wish to modify from below.
  2. Prepare your default.vcl file
  3. Enjoy!

The following environment variables are available:

  1. VARNISH_MALLOC (DEFAULT: 256m - For more information see Varnish - Storage backends)
  2. VARNISH_LOG (DEFAULT: 1 - Set to 1 or 0 to enable or disable varnishncsa, for more information see Varnish - varnishncsa)
  3. VARNISH_LOG_FORMAT (DEFAULT: %h %l %u %t "%r" %s %b "%{Referer}i" "%{User-agent}i" %{Varnish:hitmiss}x - varnishncsa log format string, for more information see Varnish - varnishncsa)

docker-compose example

docker-compose example

  1. version: '3'
  2. services:
  3. varnish:
  4. image: mikojpl/varnishcache:latest
  5. restart: always
  6. depends_on:
  7. - nginx
  8. ports:
  9. - "8080:80"
  10. environment:
  11. - VARNISH_MALLOC=1g
  12. volumes:
  13. - ./default.vcl:/etc/varnish/default.vcl:ro
  14. networks:
  15. - varnish-to-nginx
  16. nginx:
  17. image: nginx:latest
  18. restart: always
  19. networks:
  20. - varnish-to-nginx
  21. networks:
  22. varnish-to-nginx:
  23. driver: bridge

Anything else

If you need help, have questions or bug submissions, feel free to contact me @mikojpl on Twitter.