adding named volumes for db data

This commit is contained in:
andy 2022-02-27 21:53:27 +00:00
parent a2f874ec27
commit 0a8269a46c
2 changed files with 10 additions and 0 deletions

View File

@ -35,3 +35,8 @@ services:
ports: ports:
- "5432:5432" - "5432:5432"
env_file: .env # set POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB env_file: .env # set POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB
volumes:
- database-data:/var/lib/postgresql/data
volumes:
database-data:

View File

@ -31,3 +31,8 @@ services:
ports: ports:
- "5432:5432" - "5432:5432"
env_file: .env # set POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB env_file: .env # set POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB
volumes:
- database-data:/var/lib/postgresql/data
volumes:
database-data: