Created
August 15, 2016 17:54
-
-
Save Jlaird/2b4db2c446ed2580a215d3ca1c7fdbdb to your computer and use it in GitHub Desktop.
Dev docker setup
This file contains 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 | |
# Create directories | |
mkdir -p ~/data/mongo/db | |
mkdir -p ~/data/mongo/configdb | |
mkdir -p ~/data/redis | |
mkdir -p ~/data/elastic | |
# Get Mongo conf | |
curl https://gist.githubusercontent.com/Jlaird/3907584bc6c52a748172d95948f6d496/raw/640a47ed277b54b416f7eec27e871970fb5e09fc/mongo.conf > ~/data/mongo/configdb/mongo.conf | |
# Start Containers | |
# Mongo | |
docker rm -f Mongo 2>/dev/null | |
docker run --restart=always -p 27017:27017 -v ~/data/mongo/db:/data/db -v ~/data/mongo/configdb:/data/configdb --name Mongo -d mongo:3.0.10 | |
# Elastic | |
docker rm -f Elastic 2>/dev/null | |
docker run --restart=always -p9200:9200 -p9300:9300 -v ~/data/elastic:/usr/share/elasticsearch/data --name Elastic -d elasticsearch:1.4.5 | |
# Redis | |
docker rm -f Redis 2>/dev/null | |
docker run --restart=always -p 6379:6379 -v ~/data/redis:/data --name Redis -d redis:2.8.20 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment