docker-nginx-reloader

command module
v0.1.1-0...-b49bbe7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 2, 2015 License: MIT Imports: 6 Imported by: 0

README

docker-nginx-reloader

Build Status Coverage Status

Send a SIGHUP signal to Docker containers without knowing their exact name. Especially useful in combination with Kubernetes.

Example

Let's say that in your local Docker instance you have two running nginx containers called dev-nginx and test-nginx. If you run docker-nginx-reloader without any command line flags, both nginx containers will receive a SIGHUP signal and the contained nginx instances will reload. If you run docker-nginx-reloader --fragment=dev, only the dev-nginx instance will be reloaded.

Download

Usage

$ ./docker-nginx-reloader --help
Usage of ./docker-nginx-reloader:
-fragment="nginx": All running Docker containers whose names contain this fragement will receive the SIGHUP signal.
-host="unix:///var/run/docker.sock": The Docker socket to connect to, specified using tcp://host:port or unix:///path/to/socket.
-version=false: Print the version of docker-nginx-reloader and exit.

Usage in a Docker container

You can run the latest dockerized version of docker-nginx-reloader via the following command:

docker run --rm -v /var/run/docker.sock:/var/run/docker.sock patrickhoefler/docker-nginx-reloader

The dockerized version takes the same command line flags, so to stay with the example above you could run:

docker run --rm -v /var/run/docker.sock:/var/run/docker.sock patrickhoefler/docker-nginx-reloader --fragment=dev

You might need to change the -v /var/run/docker.sock:/var/run/docker.sock part according to your local setup.

Building

  • go get -d github.com/patrickhoefler/docker-nginx-reloader
  • go get github.com/tools/godep
  • cd $GOPATH/src/github.com/patrickhoefler/docker-nginx-reloader
  • godep go build creates the docker-nginx-reloader binary in the current directory.
  • godep go test runs the unit tests.
  • godep go test --tags=integration runs the unit tests as well as the Docker integration tests and builds a Docker image called patrickhoefler/docker-nginx-reloader in your locally configured Docker environment.

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Godeps
_workspace/src/github.com/docker/docker/pkg/pools
Package pools provides a collection of pools which provide various data types with buffers.
Package pools provides a collection of pools which provide various data types with buffers.
_workspace/src/github.com/fsouza/go-dockerclient
Package docker provides a client for the Docker remote API.
Package docker provides a client for the Docker remote API.
_workspace/src/github.com/fsouza/go-dockerclient/testing
Package testing provides a fake implementation of the Docker API, useful for testing purpose.
Package testing provides a fake implementation of the Docker API, useful for testing purpose.
_workspace/src/github.com/jtolds/gls
Package gls implements goroutine-local storage.
Package gls implements goroutine-local storage.
_workspace/src/github.com/smartystreets/goconvey/convey
Package convey contains all of the public-facing entry points to this project.
Package convey contains all of the public-facing entry points to this project.
_workspace/src/github.com/smartystreets/goconvey/convey/assertions
Package assertions contains the implementations for all assertions which are referenced in the convey package for use with the So(...) method.
Package assertions contains the implementations for all assertions which are referenced in the convey package for use with the So(...) method.
_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglematchers
Package oglematchers provides a set of matchers useful in a testing or mocking framework.
Package oglematchers provides a set of matchers useful in a testing or mocking framework.
_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglemock/createmock
createmock is used to generate source code for mock versions of interfaces from installed packages.
createmock is used to generate source code for mock versions of interfaces from installed packages.
_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglemock/generate
Package generate implements code generation for mock classes.
Package generate implements code generation for mock classes.
_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglemock/generate/test_cases/complicated_pkg
Package complicated_pkg contains an interface with lots of interesting cases, for use in integration testing.
Package complicated_pkg contains an interface with lots of interesting cases, for use in integration testing.
_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglemock/generate/test_cases/renamed_pkg
A package that calls itself something different than its package path would have you believe.
A package that calls itself something different than its package path would have you believe.
_workspace/src/github.com/smartystreets/goconvey/convey/assertions/ogletest
Package ogletest provides a framework for writing expressive unit tests.
Package ogletest provides a framework for writing expressive unit tests.
_workspace/src/github.com/smartystreets/goconvey/convey/gotest
Package gotest contains internal functionality.
Package gotest contains internal functionality.
_workspace/src/github.com/smartystreets/goconvey/convey/reporting
Package reporting contains internal functionality related to console reporting and output.
Package reporting contains internal functionality related to console reporting and output.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL