fix(dx): suppress AZURE_OPENAI_API_KEY warning, honest db:push reporting

- docker-compose: add empty default for AZURE_OPENAI_API_KEY to suppress
  Docker Compose "variable is not set" warning
- setup-databases.sh: detect when pnpm filter matches no packages and
  report "Skipped" instead of false "Schema pushed" success

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-04-10 18:36:35 +02:00
parent 7df515434e
commit 5647b2f8ae
2 changed files with 7 additions and 2 deletions

View file

@ -165,7 +165,7 @@ services:
DB_PASSWORD: ${POSTGRES_PASSWORD:-devpassword}
DB_NAME: chat
AZURE_OPENAI_ENDPOINT: ${AZURE_OPENAI_ENDPOINT}
AZURE_OPENAI_API_KEY: ${AZURE_OPENAI_API_KEY}
AZURE_OPENAI_API_KEY: ${AZURE_OPENAI_API_KEY:-}
AZURE_OPENAI_API_VERSION: ${AZURE_OPENAI_API_VERSION:-2024-12-01-preview}
MANA_AUTH_URL: http://mana-auth:3001
depends_on:

View file

@ -55,7 +55,12 @@ push_schema() {
local filter=$1
local name=$2
echo -e "${YELLOW}Pushing schema for ${name}...${NC}"
if pnpm --filter "$filter" db:push --force 2>/dev/null; then
local output
output=$(pnpm --filter "$filter" db:push --force 2>&1)
local exit_code=$?
if echo "$output" | grep -q "No projects matched the filters\|None of the selected packages has"; then
echo -e " ${YELLOW}⊘ Skipped (no db:push script for ${filter})${NC}"
elif [ $exit_code -eq 0 ]; then
echo -e " ${GREEN}✓ Schema pushed${NC}"
else
echo -e " ${RED}✗ Failed (may not have db:push script)${NC}"