Skip to content

Latest commit

 

History

History
142 lines (100 loc) · 3.12 KB

README.md

File metadata and controls

142 lines (100 loc) · 3.12 KB

database-docker

rapid database setup for faster development

Postgresql

Server :

sudo docker run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -v /home/<your-user>/PycharmProjects/clustering/data_db/postgresql:/var/lib/postgresql/data -e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432 -d postgres

# or

sudo docker run --name some-postgres --add-host=database:172.17.0.1 -e POSTGRES_PASSWORD=mysecretpassword -v /home/<your-user>/PycharmProjects/clustering/data_db/postgresql:/var/lib/postgresql/data -e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432 -d postgres
  • run client
# publish on port 9990 in computer host

sudo docker run -p 9990:80 -e "[email protected]" -e "PGADMIN_DEFAULT_PASSWORD=SuperSecret" --link some-postgres:postgres -d dpage/pgadmin4

How to :

# run with docker client server
# go to 127.0.0.1
# login >> username:[email protected]; pass: SuperSecret
# set DB
    # host=postgres
    # db=postgres
    # user=postgres
    # pass=mysecretpassword


MongoDB

Server :

sudo docker run --name some-mongo -p 27017:27017 -v /home/<your-user>/PycharmProjects/clustering/data_db/mongo:/data/db -d mongo
sudo docker run -it --rm -p 8081:8081 --link some-mongo:mongo mongo-express

# or

sudo docker run --name some-mongo -v /home/<your-user>/mongo:/data/db -d mongo
sudo docker run -it --rm -p 8081:8081 --link some-mongo:mongo mongo-express

How to :



SqLite

Sever :

Client :

How to :



Sql Alchemy



ElasticSearch

Sever :

  • run server
docker run -d -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" elasticsearch

Client :

How to :

  • run elastic server
  • cek connection with elasticsearch on google chrome
  • green button >>> successful connected


Redis

Server :

  • run server
sudo docker run --name some-redis -d -h redis -p 6379 redis

Client :

sudo npm install -g redis-commander

redis-commander -p 32768

How to :

  • run redis server
  • run client app
  • access on webbrowser

Cassandra

Server :

  • run server
docker run -d --rm --name cassandra cassandra

Client :

docker run -d -e CASSANDRA_HOST_IP=$(docker inspect --format '{{.NetworkSettings.IPAddress}}' cassandra) -e CASSANDRA_PORT=9042 -p 3000:3000 --name cassandra-web delermando/docker-cassandra-web:v0.4.0

Ref