version: '3' services: db: image: postgres:latest volumes: - ./data:/var/lib/postgresql/data ports: - 5432:5432 environment: POSTGRES_USER: "root" POSTGRES_PASSWORD: "password"