I have created a volume
docker volume create postgresql_db
Now i am using it in my docker-compose.xml
services: postgresql: