Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
more snipets
# redis
docker run --name redis -d -p 6379:6379 --restart unless-stopped redis
# mysql
docker run --name mysql -e MYSQL_ROOT_PASSWORD=root -d -p 3306:3306 --restart unless-stopped mysql:5.6
# mongo
docker run -d -p 27017:27017 -p 28017:28017 -e MONGODB_PASS="docker" tutum/mongodb
# postgres
mkdir -p $HOME/docker/volumes/postgres && docker run --name pg-docker -e POSTGRES_PASSWORD=postgres -d -p 5432:5432 -v $HOME/docker/volumes/postgres:/var/lib/postgresql/data --restart unless-stopped postgres
# elastic search
docker run --name=elasticsearch -d -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.6.2
# kibana
docker run -p 5601:5601 --name kibana -d --link elasticsearch:elasticsearch docker.elastic.co/kibana/kibana:7.6.2
# full docker-compose.yml to use appsearch
version: '2'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.6.2
environment:
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- discovery.type=single-node
ulimits:
memlock:
soft: -1
hard: -1
mem_limit: 1g
volumes:
- esdata1:/usr/share/elasticsearch/data
ports:
- 9200:9200
kibana:
image: docker.elastic.co/kibana/kibana:7.6.2
links:
- elasticsearch
mem_limit: 512m
ports:
- 5601:5601
appsearch:
image: docker.elastic.co/app-search/app-search:7.6.2
environment:
- "elasticsearch.host=http://elasticsearch:9200"
- allow_es_settings_modification=true
- JAVA_OPTS=-Xmx1g
links:
- elasticsearch
mem_limit: 2g
ports:
- 3002:3002
volumes:
esdata1:
driver: local
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment