services:
  app:
    image: mcr.microsoft.com/devcontainers/base:noble
    command: sleep infinity
    volumes:
      - ..:/workspaces/drop:cached
    depends_on:
      db:
        condition: service_healthy

  db:
    image: postgres:14-alpine
    environment:
      POSTGRES_USER: drop
      POSTGRES_PASSWORD: drop
      POSTGRES_DB: drop
    volumes:
      - pgdata:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U drop -d drop"]
      interval: 5s
      timeout: 5s
      retries: 20

volumes:
  pgdata:
