Git Product home page Git Product logo

docker-varnish's Introduction

Varnish with Docker

Varnish environment variables

Varnish will use the following environment variables. You can override them if you want

VARNISH_PORT 80

Build the image

To build the image run:

docker build -t varnish git://github.com/dockerimages/docker-varnish

Start the container

To run the container you need to link the containers you want to run behind the load balancer that Varnish will create. Varnish will detect all the node containers you pass and add them to the load balancer, we do this with the "parse" file. The only requirement is that when you link your containers you use the name "nodeN". Example: --link container_name:node1 --link container_name2:node2. This command will also map the port 80 inside the Varnish container to the port 8080 in your host so you can access the node application at http://localhost:8080

$ sudo docker run -itd -p 8080:80 --link container_name:node1 --link container_name2:node2 yourname/varnish 

Bash into the container

If you want to bash into the container you can, just do:

$ sudo docker run -itd -p 8080:80 --link container_name:node1 --link container_name2:node2 yourname/varnish bash

docker-varnish's People

Contributors

frank-dspeed avatar jacksoncage avatar oddmutou avatar rivertam avatar studiotomi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

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.