version: '3.8' services: devcontainer: image: mcr.microsoft.com/devcontainers/base:ubuntu volumes: - ../..:/workspaces:cached - /var/run/docker.sock:/var/run/docker.sock network_mode: service:db command: sleep infinity db: image: postgres:latest restart: unless-stopped volumes: - postgres-data:/var/lib/postgresql/data environment: POSTGRES_PASSWORD: postgres POSTGRES_USER: postgres POSTGRES_DB: postgres volumes: postgres-data: