Skip to content

Instantly share code, notes, and snippets.

@dtest
Last active Mar 20, 2016
Embed
What would you like to do?
Visualizing MySQL with Docker Compose
$ git clone git@github.com:dtest/visualize-mysql.git
$ cd visualize-mysql
$ docker-machine create -d virtualbox --virtualbox-memory "2048" \
--virtualbox-cpu-count "2" \
visualize
$ eval $(docker-machine env visualize)
$ docker-compose ps
Name Command State Ports
---------------------------------------------------------------------------------------------------------------------
elasticsearch /docker-entrypoint.sh -Des ... Up 0.0.0.0:9200->9200/tcp, 9300/tcp
elasticsearch_data /true Exit 0
graphite /usr/bin/supervisord Up 0.0.0.0:8000->80/tcp, 8125/udp, 0.0.0.0:8126->8126/tcp
logstash /app/bin/boot Up 0.0.0.0:9292->9292/tcp
mysql /entrypoint.sh mysqld Up 0.0.0.0:3306->3306/tcp
mysql_data /true Exit 0
sysbench /etc/entrypoint.sh -d Up
$ docker-compose up -d
mysql_data:
container_name: mysql_data
image: tianon/true
volumes:
- /var/lib/mysql
- /var/lib/mysql-files
mysql:
container_name: mysql
environment:
- MYSQL_ROOT_PASSWORD=ple15
- MYSQL_DATABASE=world
build: mysql
volumes_from:
- mysql_data
volumes:
- "./mysql/config:/etc/mysql/conf.d"
expose:
- "3306"
ports:
- "3306:3306"
FROM mysql:5.7
ADD world_innodb.sql /docker-entrypoint-initdb.d/world.sql
EXPOSE 3306
CMD ["mysqld"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment