Code Monkey home page Code Monkey logo

varnishcache's Introduction

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:

VARNISH_MALLOC (DEFAULT: 256m - For more information see Varnish - Storage backends)
VARNISH_LOG (DEFAULT: 1 - Set to 1 or 0 to enable or disable varnishncsa, for more information see Varnish - varnishncsa)
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)

Useful links

docker-compose example

docker-compose example

version: '3'
services:
    varnish:
        image: mikojpl/varnishcache:latest
        restart: always
        depends_on:
            - nginx
        ports:
            - "8080:80"
        environment:
            - VARNISH_MALLOC=1g
        volumes:
            - ./default.vcl:/etc/varnish/default.vcl:ro
        networks:
            - varnish-to-nginx
    nginx:
        image: nginx:latest
        restart: always
        networks:
            - varnish-to-nginx
networks:
    varnish-to-nginx:
        driver: bridge

Anything else

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

varnishcache's People

Contributors

mikoj avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

lcfb91

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.