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: