This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run mongodb | |
sudo docker run -d --name mongo --restart always -p 27017:27017 -v /home/debian/volumes/mongodb:/data/db mongo | |
#Run Gitlab: | |
sudo docker run -it --hostname git.onmiz.info --rm -p 9000:80 --name gitlab -v /home/debian/volumes/gitlab/config:/etc/gitlab -v /home/debian/volumes/gitlab/logs:/var/log/gitlab -v /home/debian/volumes/gitlab/data:/var/opt/gitlab gitlab/gitlab-ce | |
sudo docker run -d --hostname git.onmiz.info -p 9000:80 --restart always --name gitlab -v /home/debian/volumes/gitlab/config:/etc/gitlab -v /home/debian/volumes/gitlab/logs:/var/log/gitlab -v /home/debian/volumes/gitlab/data:/var/opt/gitlab gitlab/gitlab-ce | |
# Run Elasticsearch | |
sudo docker run --name elastic -d -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -v /home/debian/volumes/elasticsearch:/var/lib/elasticsearch elasticsearch:7.8.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# A menu driven shell script sample template | |
## ---------------------------------- | |
# Step #1: Define variables | |
# ---------------------------------- | |
EDITOR=vim | |
PASSWD=/etc/passwd | |
RED='\033[0;41;30m' | |
STD='\033[0;0;39m' | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rsync -rvh --ignore-existing local_folder remote_machine:remove_folder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = 'Adel' | |
from shared_connections import SharedConnections | |
from datetime import datetime,timedelta | |
import json | |
es = SharedConnections.ElasticSearchConnection | |
uiFrom = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use db | |
show collections | |
show databases | |
db.mytable.insert({}) | |
db.mytable.find() | |
db.mytable.find({name:'Ehsan'}) | |
db.mytable.find({name:'Ehsan'},{family:1}) | |
db.mytable.find({name:'Ehsan'},{id:0}) | |
db.mytable.count() | |
db.mytable.find({name:'Ehsan'}).count() |