Giter Club home page Giter Club logo

mongo-supervisor's Introduction

mongo-supervisor

mongo-supervisor aims at providing a simple but flexible supervisor for Docker containers running mongodb.

It runs mongodb, and provides a rest api that can be called from any http client, for instance with basic curl, to start/stop mongo, create a backup with mongodump, and restore a backup with mongorestore.

Building

a build.js script file provides several targets:

  • package: copies a minimal version of mongo-supervisor in a directory, along with its start script. You may find it useful to copy it in your own container.

  • docker-create: creates a docker image based on the docker/Dockerfile recipe. It uses the default mongodb configuration file, so you may want to tune that part.

  • docker-run: creates a docker image, and run it. The docker container is temporary, as soon as the script ends, it is killed and removed.

Possible options: --open-api -O : Open rest api (no security check) [docker] --sec-headers -h HEAD:VALUE : define security header and value [docker] --tag -t tag : user this tag as the image name [docker] --sudo-docker -s : docker needs to be run with sudo [docker] --location -l : directory where to create the package [package only]

Example:

  • node build docker-run -O creates and runs a docker container with mongo-supervisor, until you ctrl-c.

Security

The security can be configured in the configuration file (namely mongosupervisor.yaml) or during the build. The security options are:

  • open api: just no security at all. The default is no access, so you need to be explicit if you want to make it widely open. In the build script: use the --open-api or -O flag. In the configuration file: change the security part to be security: open: true

  • Headers: mongo-supervisors checks that a given http header is provided with a given value. This is typically useful for clients using a TLS connection. In the build script: use the --open-api or -O flag. In the configuration file: change the security part to be

    security:
        header-key-name: "SomeHeaderName"
        header-key-value: "some secret value"

for instance:

        header-key-name: "X-ACCESS"
        header-key-value: "efb92b97a659bf04ac599bac68e36559fec30eafd63381bf19513c82b290c765"

mongo-supervisor's People

Contributors

reyesr avatar

Watchers

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