version: "3.9" services: api: build: . ports: - "8000:8000" environment: - DATABASE_URL=postgresql://postgres:postgres@db:5432/txn - GROQ_API_KEY=${GROQ_API_KEY:-} - GROQ_MODEL=llama-3.1-8b-instant - ALLOWED_ORIGINS=* depends_on: db: condition: service_healthy db: image: postgres:15-alpine environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=postgres - POSTGRES_DB=txn ports: - "5432:5432" volumes: - pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 5s timeout: 5s retries: 5 volumes: pgdata: