From 682ac178ee8f1d53af7012e903ab22577dadd92f Mon Sep 17 00:00:00 2001 From: Bheem Date: Mon, 9 Mar 2020 16:17:45 -0500 Subject: [PATCH] Update docker-compose to persist postgres data use volumes in docker-compose to persist data --- docker-compose.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 7f3e2fdf..235af71f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,6 +7,8 @@ services: test: psql postgres --command "select 1" -U postgres ports: - "5432:5432" + volumes: + - postgres-volume:/var/lib/postgresql/data environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: password @@ -39,3 +41,5 @@ services: ports: - "8443:443" - "80:80" +volumes: + postgres-volume: