parent
e654ba63ab
commit
c063acf673
@ -0,0 +1,15 @@
|
||||
# Enter the Container w/ Bash
|
||||
|
||||
`docker-compose exec --user root db /bin/bash`
|
||||
|
||||
# Enter the Postgres Shell
|
||||
|
||||
`docker-compose exec --user root db psql -h localhost -U postgres`
|
||||
|
||||
# Create a DB
|
||||
|
||||
While inside the shell, run the following:
|
||||
|
||||
```
|
||||
CREATE DATABASE mydatabase;
|
||||
```
|
@ -0,0 +1,9 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
db:
|
||||
image: postgres:latest
|
||||
volumes:
|
||||
- ./data:/var/lib/postgresql/data
|
||||
ports:
|
||||
- 5432:5432
|
Loading…
Reference in new issue