Giter Club home page Giter Club logo

docker-mongo-auth's Introduction

docker-mongo-auth

A Docker Image for MongoDB which makes it easy to create an Admin, a Database and a Database User when the container is first launched.

Customization

There are a number of environment variables which you can specify to customize the username and passwords of your users.

  • With Dockerfile

    // Auth Configuration.
    // These environment variables can also be specified through command line or docker-compose configuration
    # ENV AUTH yes
    
    # ENV MONGODB_ADMIN_USER root
    # ENV MONGODB_ADMIN_PASS password
    
    # ENV MONGODB_APPLICATION_DATABASE your_db
    # ENV MONGODB_APPLICATION_USER user
    # ENV MONGODB_APPLICATION_PASS password
    
  • With docker-compose.yml

    services:
      db:
        image: aashreys/mongo-auth:latest
        environment:
          - AUTH=yes
          - MONGODB_ADMIN_USER=admin
          - MONGODB_ADMIN_PASS=admin123
          - MONGODB_APPLICATION_DATABASE=sample
          - MONGODB_APPLICATION_USER=aashrey
          - MONGODB_APPLICATION_PASS=admin123
        ports:
          - "27017:27017"
    // more configuration
    
  • With command line

    docker run -it \
      -e AUTH=yes \
      -e MONGODB_ADMIN_USER=admin \
      -e MONGODB_ADMIN_PASS=adminpass \
      -e MONGODB_APPLICATION_DATABASE=mytestdatabase \
      -e MONGODB_APPLICATION_USER=testuser \
      -e MONGODB_APPLICATION_PASS=testpass \
      -p 27017:27017 aashreys/mongo-auth:latest
    

Find the image on Docker Cloud @ https://cloud.docker.com/swarm/aashreys/repository/docker/aashreys/mongo-auth

docker-mongo-auth's People

Contributors

aashreys avatar

Watchers

 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.