version: '3.1'
services:
  db:
    image: postgres
    restart: always
    environment:
      - POSTGRES_PASSWORD=mySQLRoot
    ports:
      - '5432:5432'
    volumes: 
      - db:/var/lib/postgresql/data
volumes:
  db:
    driver: local