Skip to content

Commit aa18e0b

Browse files
committed
Update README files.
1 parent ede23d1 commit aa18e0b

File tree

5 files changed

+54
-14
lines changed

5 files changed

+54
-14
lines changed

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,33 @@
11
# Local Docker DB
22

33
## What?
4+
45
A collection of Docker Compose files I've used to quickly spin local databases of various sorts.
56

67
## Why?
8+
79
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.
810

911
## How?
12+
1013
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/).
1114

15+
## Explore a Container w/ Bash
16+
17+
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.
18+
19+
```
20+
docker-compose exec --user root SERVICE_NAME /bin/bash
21+
```
22+
1223
## Local Persistence
24+
1325
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.
1426

1527
```
1628
docker-compose down -v
1729
```
1830

19-
## Authentication
20-
For authenticating as super user with each of these examples, `root` is the username and `password` is the password.
21-
2231
## Contributions
32+
2333
If you have a Docker Compose configuration for a database not seen here, please consider making a pull request to add it!

mariadb/README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# Enter the Container w/ Bash
1+
# MariaDB w/ Docker Compose
2+
3+
## Enter the Container w/ Bash
24

35
`docker-compose exec --user root db /bin/bash`
46

@@ -8,7 +10,13 @@
810

911
When prompted, enter `password` as the password.
1012

11-
# Create a DB
13+
## Super User Authentication
14+
15+
Username: `root`
16+
17+
Password: `password`
18+
19+
## Create a DB
1220

1321
While inside the shell, run the following:
1422

mongo/README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
1-
# Enter the Container w/ Bash
1+
# MongoDB w/ Docker Compose
2+
3+
## Enter the Container w/ Bash
24

35
`docker-compose exec --user root db /bin/bash`
46

5-
# Enter the Mongo Shell
7+
## Enter the Mongo Shell
68

79
`docker-compose exec --user root db mongo`
810

9-
# Create a DB w/ User
11+
## Super User Authentication
12+
13+
Username: `root`
14+
15+
Password: `password`
16+
17+
## Create a DB w/ User
1018

1119
While in the shell, run the following:
1220

mysql/README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
1-
# Enter the Container w/ Bash
1+
## Enter the Container w/ Bash
22

33
`docker-compose exec --user root db /bin/bash`
44

5-
# Enter the MySQL Shell
5+
## Enter the MySQL Shell
66

77
`docker-compose exec --user root db mysql -u root -p`
88

99
When prompted, enter `password` as the password.
1010

11-
# Create a DB
11+
## Super User Authentication
12+
13+
Username: `root`
14+
15+
Password: `password`
16+
17+
## Create a DB
1218

1319
While inside the shell, run the following:
1420

postgres/README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
1-
# Enter the Container w/ Bash
1+
# Postgres w/ Docker Compose
2+
3+
## Enter the Container w/ Bash
24

35
`docker-compose exec --user root db /bin/bash`
46

5-
# Enter the Postgres Shell
7+
## Enter the Postgres Shell
68

79
`docker-compose exec --user root db psql -h localhost -U root`
810

9-
# Create a DB
11+
## Super User Authentication
12+
13+
Username: `root`
14+
15+
Password: `password`
16+
17+
## Create a DB
1018

1119
While inside the shell, run the following:
1220

0 commit comments

Comments
 (0)