Skip to content

Commit c063acf

Browse files
committed
Add setup for Postgres.
1 parent e654ba6 commit c063acf

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

postgres/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Enter the Container w/ Bash
2+
3+
`docker-compose exec --user root db /bin/bash`
4+
5+
# Enter the Postgres Shell
6+
7+
`docker-compose exec --user root db psql -h localhost -U postgres`
8+
9+
# Create a DB
10+
11+
While inside the shell, run the following:
12+
13+
```
14+
CREATE DATABASE mydatabase;
15+
```

postgres/docker-compose.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: '3'
2+
3+
services:
4+
db:
5+
image: postgres:latest
6+
volumes:
7+
- ./data:/var/lib/postgresql/data
8+
ports:
9+
- 5432:5432

0 commit comments

Comments
 (0)