diff --git a/README.md b/README.md index 5bc02df..a8d0f61 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,33 @@ # Local Docker DB ## What? + A collection of Docker Compose files I've used to quickly spin local databases of various sorts. ## Why? + Because I've oft needed them, particularly when I just don't wanna deal with the hassle of spinning up a DB on my own system. ## How? + Clone the repo or copy a `docker-compose.yml` file to your system, `cd` into that directory, and turn it on with `docker-compose up`. You may also use a `docker-compose.override.yml` file inside this repository to customize a container. For a full reference on how to use Docker Compose, [go here](https://docs.docker.com/compose/reference/). +## Explore a Container w/ Bash + +In any given container, run the following. Most of the time, the service name will just be `db`, but there may be an exception or two. + +``` +docker-compose exec --user root SERVICE_NAME /bin/bash +``` + ## Local Persistence + In each setup, a managed volume is created to persist each container's data. This volume can be deleted by passing the `-v` option when deleting the container. ``` docker-compose down -v ``` -## Authentication -For authenticating as super user with each of these examples, `root` is the username and `password` is the password. - ## Contributions + If you have a Docker Compose configuration for a database not seen here, please consider making a pull request to add it! diff --git a/mariadb/README.md b/mariadb/README.md index 0310239..40674b3 100644 --- a/mariadb/README.md +++ b/mariadb/README.md @@ -1,4 +1,6 @@ -# Enter the Container w/ Bash +# MariaDB w/ Docker Compose + +## Enter the Container w/ Bash `docker-compose exec --user root db /bin/bash` @@ -8,7 +10,13 @@ When prompted, enter `password` as the password. -# Create a DB +## Super User Authentication + +Username: `root` + +Password: `password` + +## Create a DB While inside the shell, run the following: diff --git a/mongo/README.md b/mongo/README.md index a7d332a..c937107 100644 --- a/mongo/README.md +++ b/mongo/README.md @@ -1,12 +1,20 @@ -# Enter the Container w/ Bash +# MongoDB w/ Docker Compose + +## Enter the Container w/ Bash `docker-compose exec --user root db /bin/bash` -# Enter the Mongo Shell +## Enter the Mongo Shell `docker-compose exec --user root db mongo` -# Create a DB w/ User +## Super User Authentication + +Username: `root` + +Password: `password` + +## Create a DB w/ User While in the shell, run the following: diff --git a/mysql/README.md b/mysql/README.md index 0a4c513..c87b6ba 100644 --- a/mysql/README.md +++ b/mysql/README.md @@ -1,14 +1,20 @@ -# Enter the Container w/ Bash +## Enter the Container w/ Bash `docker-compose exec --user root db /bin/bash` -# Enter the MySQL Shell +## Enter the MySQL Shell `docker-compose exec --user root db mysql -u root -p` When prompted, enter `password` as the password. -# Create a DB +## Super User Authentication + +Username: `root` + +Password: `password` + +## Create a DB While inside the shell, run the following: diff --git a/postgres/README.md b/postgres/README.md index a28f58c..4f58456 100644 --- a/postgres/README.md +++ b/postgres/README.md @@ -1,12 +1,20 @@ -# Enter the Container w/ Bash +# Postgres w/ Docker Compose + +## Enter the Container w/ Bash `docker-compose exec --user root db /bin/bash` -# Enter the Postgres Shell +## Enter the Postgres Shell `docker-compose exec --user root db psql -h localhost -U root` -# Create a DB +## Super User Authentication + +Username: `root` + +Password: `password` + +## Create a DB While inside the shell, run the following: