Coder Social home page Coder Social logo

docker-consul-snapshot's Introduction

docker-consul-shapshot

Dockerized consul-snapshot

Build

cd Dockerfile && docker build -t consul-snapshot .

Run in backup mode

docker run --name consul-snapshot consul-snapshot

Run in restore mode

docker run --name consul-snapshot consul-snapshot restore

Override environment variables

docker run --name consul-snapshot -e S3BUCKET=microservices-devops -e S3REGION=us-west-2 -e BACKUPINTERVAL=60 -e CONSUL_HTTP_ADDR=172.17.0.1:8500 consul-snapshot

Configuration

Configuration is done from environment variables passed to the container.

S3BUCKET (the s3 bucket where backups should be delivered)
S3REGION (the region the s3 bucket is located)
AWS_ACCESS_KEY_ID (the access key id used to access the bucket)
AWS_SECRET_ACCESS_KEY (the secret key used to access the bucket)
BACKUPINTERVAL (how often you want the backup to run in seconds)

And through the consul api there are several options available (https://github.com/hashicorp/consul/blob/master/api/api.go#L126)

CONSUL_HTTP_ADDR (default: 127.0.0.1:8500)
CONSUL_HTTP_TOKEN (default: nil)
CONSUL_HTTP_AUTH (default: nil)
CONSUL_HTTP_SSL (default: nil)
CONSUL_HTTP_SSL_VERIFY (default: nil)

docker-consul-snapshot's People

Contributors

ntmggr avatar

Watchers

James Cloos 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.