Skip to content

Instantly share code, notes, and snippets.

@pydevd
Last active April 30, 2019 14:17
Show Gist options
  • Save pydevd/3bb3508363b9e0c99f8c42a5c98276cd to your computer and use it in GitHub Desktop.
Save pydevd/3bb3508363b9e0c99f8c42a5c98276cd to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
sudo mkdir -p /var/lib/mysql
sudo mkdir -p /var/lib/postgresql/data
sudo mkdir -p /var/lib/mongodb/data
sudo mkdir -p /var/lib/edgedb/data
sudo docker run \
--detach \
--name=edgedb-server \
--publish 5656:5656 \
--volume=/var/lib/edgedb/data:/var/lib/edgedb/data
edgedb/edgedb
sudo docker run \
--detach \
--name=mysql-server \
-e MYSQL_ROOT_PASSWORD=password \
--publish 3306:3306 \
--volume=/var/lib/mysql:/var/lib/mysql \
mysql:5.7
sudo docker run \
--detach \
--name=postgres-server \
--env="POSTGRES_PASSWORD=postgres" \
--publish 5432:5432 \
--volume=/var/lib/postgresql/data:/var/lib/postgresql/data \
postgres
sudo docker run \
--detach \
--hostname=rabbitmq-server \
--name=rabbitmq-server \
-p 15672:15672 \
-p 5672:5672 \
rabbitmq:3-management
sudo docker run \
--detach \
--name=mongo-server \
--volume=/var/lib/mongodb/data:/data/db \
--publish 27017:27017 \
mongo:3
sudo docker run \
--detach \
--name=redis-server \
--publish 6379:6379 \
redis
sudo docker stop mongo-server
sudo docker stop redis-server
sudo docker stop mysql-server
sudo docker stop postgres-server
sudo docker stop rabbitmq-server
echo "alias _do-up-mysql='sudo docker start mysql-server'" >> ~/.bash_aliases
echo "alias _do-kill-mysql='sudo docker stop mysql-server'" >> ~/.bash_aliases
echo "alias _do-up-postgres='sudo docker start postgres-server'" >> ~/.bash_aliases
echo "alias _do-kill-postgres='sudo docker stop postgres-server'" >> ~/.bash_aliases
echo "alias _do-up-rabbitmq='sudo docker start rabbitmq'" >> ~/.bash_aliases
echo "alias _do-kill-rabbitmq='sudo docker stop rabbitmq'" >> ~/.bash_aliases
echo "alias _do-up-mongo='sudo docker start mongo-server'" >> ~/.bash_aliases
echo "alias _do-kill-mongo='sudo docker stop mongo-server'" >> ~/.bash_aliases
echo "alias _do-up-redis='sudo docker start redis-server'" >> ~/.bash_aliases
echo "alias _do-kill-redis='sudo docker stop redis-server'" >> ~/.bash_aliases
echo "alias _do-go-mysql='mysql -uroot -ppassword -h0.0.0.0'" >> ~/.bash_aliases
. ~/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment