FIX(db): use existing user and database

- Created mas database in PostgreSQL
- Changed from mas_user to bluemayne (existing user)
- Use postgresql-password secret (root password)
- Add CHAINLIT_DATABASE_URL for Chainlit compatibility
- Improved error handling in chainlit_app.py
This commit is contained in:
2025-12-24 00:01:57 +09:00
parent 8e736323aa
commit 6cee617072
2 changed files with 8 additions and 4 deletions

View File

@@ -35,13 +35,17 @@ spec:
key: groq-api-key
- name: GROQ_API_BASE
value: "https://api.groq.com/openai/v1"
# Chainlit uses asyncpg directly (not SQLAlchemy)
- name: CHAINLIT_DATABASE_URL
value: "postgresql://bluemayne:$(POSTGRES_PASSWORD)@postgresql-primary.postgresql.svc.cluster.local:5432/mas"
# SQLAlchemy format (if needed)
- name: DATABASE_URL
value: "postgresql+asyncpg://mas_user:$(POSTGRES_PASSWORD)@postgresql.postgresql.svc.cluster.local:5432/mas"
value: "postgresql+asyncpg://bluemayne:$(POSTGRES_PASSWORD)@postgresql-primary.postgresql.svc.cluster.local:5432/mas"
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: mas-postgres
key: password
name: postgresql-password
key: postgres-password
- name: REDIS_URL
value: "redis://redis:6379/0"
resources: