From 59a5ca865a732550860dc1822298e4a7dee9c5e4 Mon Sep 17 00:00:00 2001 From: soumitradev Date: Mon, 31 Jul 2023 22:14:57 +0530 Subject: [PATCH] build: create volumes for db persistence --- docker-compose.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 5bec1fc8..94b4cd6b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,6 +12,8 @@ services: interval: 10s timeout: 30s retries: 3 + volumes: + - ./data:/var/lib/postgresql/data profiles: - "dev" - "prod" @@ -23,6 +25,8 @@ services: - .env.testing ports: - "5432:5432" + volumes: + - ./data:/var/lib/postgresql/data healthcheck: test: ["CMD", "pg_isready", "-d", "${POSTGRES_DB}"] interval: 10s