name: tracechat-ledger services: postgres: image: postgres:16-alpine environment: POSTGRES_DB: tracechat POSTGRES_USER: tracechat POSTGRES_PASSWORD: tracechat ports: - "5432:5432" volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U tracechat -d tracechat"] interval: 5s timeout: 5s retries: 10 api: build: context: ./apps/api environment: APP_ENV: local DATABASE_URL: postgresql+asyncpg://tracechat:tracechat@postgres:5432/tracechat CORS_ORIGINS: http://localhost:3000 LLM_PROVIDER: ${LLM_PROVIDER:-groq} GROQ_API_KEY: ${GROQ_API_KEY:-} GROQ_MODEL: ${GROQ_MODEL:-openai/gpt-oss-120b} GROQ_BASE_URL: https://api.groq.com/openai/v1 OPENROUTER_API_KEY: ${OPENROUTER_API_KEY:-} OPENROUTER_MODEL: ${OPENROUTER_MODEL:-openai/gpt-4.1-mini} OPENROUTER_BASE_URL: https://openrouter.ai/api/v1 APP_PUBLIC_URL: http://localhost:8000 ports: - "8000:8000" depends_on: postgres: condition: service_healthy web: build: context: ./apps/web args: VITE_API_URL: http://localhost:8000 environment: VITE_API_URL: http://localhost:8000 ports: - "3000:3000" depends_on: - api volumes: postgres_data: