Git Product home page Git Product logo

local-docker's Introduction

local-docker

Docker-compose for local development.

Build Status

Installation

MongoDB

  • To run the MongoDB inside the docker container run the command
docker-compose up MongoDB -d
  • If you want to connect with MongoDB from your host machine to the container then install mongo client on the host machine.
xcode-select --install
brew tap mongodb/brew
brew install mongodb-community-shell mongodb-database-tools mongosh

Now you can access your MongoDB instance by running the mongo command on the terminal.

Elasticsearch

Setup

  • Bring up the containers by running
docker-compose up elasticsearch -d
  • While docker-compose up is running, get inside the elasticsearch container by running the command:
docker-compose exec elasticsearch bash

Then run the following command to generate passwords for all the built-in users:

[root@a4f615e87653 elasticsearch]# bin/elasticsearch-setup-passwords auto

Note them down and keep them somewhere safe. Exit the container by pressing CTRL+D

  • Now restart the elasticsearch docker container by running the command:
docker-compose down elasticsearch
docker-compose up elasticsearch -d

Now you can access your elasticsearch instance on http://elastic:<YOUR_ELASTIC_USER_PASSWORD>@localhost:9200

Note: You can change your elastic password by making a post request from Postman or Kibana.

POST /_security/user/elastic/_password
{
  "password" : <YOUR_NEW_PASSWORD>
}

Kibana

  • Open the kibana.yml file and change the elasticsearch.password. It should look like this:
server.name: kibana
server.host: "0"
elasticsearch.hosts: [ "http://elasticsearch:9200" ]
elasticsearch.username: kibana
elasticsearch.password: <kibana password>
  • To run the kibana inside the docker container run the command
docker-compose up kibana -d

Now you can access your kibana instance on http://localhost:5601. It will require a username and password. username will be elastic and password will be <YOUR_ELASTIC_USER_PASSWORD>

local-docker's People

Contributors

saurabhg22 avatar

Watchers

James Cloos avatar  avatar

Forkers

jagzmz

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.