From 0a8269a46ca6300181019219aa72a53c77a9e18b Mon Sep 17 00:00:00 2001 From: andy Date: Sun, 27 Feb 2022 21:53:27 +0000 Subject: [PATCH] adding named volumes for db data --- docker-compose.build.yml | 5 +++++ docker-compose.yml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/docker-compose.build.yml b/docker-compose.build.yml index 71a03a2..772944a 100644 --- a/docker-compose.build.yml +++ b/docker-compose.build.yml @@ -35,3 +35,8 @@ services: ports: - "5432:5432" env_file: .env # set POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB + volumes: + - database-data:/var/lib/postgresql/data + +volumes: + database-data: \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 8eed245..1e7e832 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -31,3 +31,8 @@ services: ports: - "5432:5432" env_file: .env # set POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB + volumes: + - database-data:/var/lib/postgresql/data + +volumes: + database-data: