Skip to content

Commit 8d9822f

Browse files
committed
Use a named volume for our data to make creating/dropping it easier
1 parent 176258b commit 8d9822f

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Diff for: .dockerignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
data

Diff for: docker-compose.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
version: '2'
2+
volumes:
3+
pgdata:
4+
driver: local
5+
26
services:
37
db:
48
build: postgres-dockerfile
59
restart: unless-stopped
610
env_file:
711
- ./postgres-dockerfile/postgres.env
812
volumes:
9-
- /mnt/pgdata/pgdata:/var/lib/postgresql/data
13+
- pgdata:/var/lib/postgresql/data
1014
expose:
1115
- "5432"
1216

@@ -15,7 +19,7 @@ services:
1519
ports:
1620
- "5000:5000"
1721
volumes:
18-
- /datadump:/media/dbdump
22+
- ./data/dbdump:/media/dbdump
1923
restart: unless-stopped
2024
env_file:
2125
- ./postgres-dockerfile/postgres.env

0 commit comments

Comments
 (0)