version: "2" services: postgres: image: postgres:10 restart: always environment: POSTGRES_PASSWORD: enter ports: - "5432:5432" volumes: - "./data:/var/lib/postgresql/data"