version: '2' services: db: image: postgres:10.1 ports: - "5432" volumes: - ./data:/var/lib/postgresql/data